I wrote this for my bot to change the channel modes easily. I also put in a moderation trigger as well. It's probably not very good, but it can be useful if you don't want to type the full mode command out. Plus, it lets you change modes without being an op. As long as your bot has op status.
Usage:
Load the script, then set admin and channel via the commands menu.
Triggers are as follows:
!admin [Nick] (Adds a nick to the admin list)
!deladmin [Nick] (Removes a nick from the admin list)
!mode [-/+mode] (the mode you wish to change, ex: +S, -S, +U, etc.)
!mod (Moderates the channel and sends a message saying so)
!unmod (Unmoderates the channel and sends a message saying so)
on *:load:{
if ($version > 6.30) { echo -a 15,2The Mode and Moderation Bot by 2,7Max Evans15,2 was successfully loaded. | echo -a 15,2Check the menubar for owner and channel set options. }
else { echo -a 8,1Sorry. This addon requires the latest version of mIRC. Please download it from www.mirc.com | .unload -rs " $+ $script $+ " }
}
on *:text:!admin *:#:{
if ($nick == %mbotowner) { writeini mbotadmins.ini $chan $2 mbotadmin | notice $nick Added $2 To Admin List }
else { notice $nick Command Ignored (Must Be Owner) }
}
on *:text:!deladmin *:#:{
if ($nick == %mbotowner) { remini mbotadmins.ini $chan $2 mbotadmin | notice $nick Deleted $2 From Admin List }
else { notice $nick Command Ignored (Must Be Owner) }
}
on *:text:!mode *:%mbotchan: {
if ($readini(mbotadmins.ini,$chan,$nick) == mbotadmin) {
mode $chan $2-
}
else {
.notice $nick Sorry, only admins can use this feature.
}
}
on *:text:!mod:%mbotchan: {
if ($readini(mbotadmins.ini,$chan,$nick) == mbotadmin) {
mode $chan +m
.msg $chan Room is now being moderated. Only voiced (+v) users can chat.
}
else {
.notice $nick Sorry, only admins can use this feature.
}
}
on *:text:!unmod:%mbotchan: {
if ($readini(mbotadmins.ini,$chan,$nick) == mbotadmin) {
mode $chan -m
.msg $chan Room is no longer being moderated. All users can now chat.
}
else {
.notice $nick Sorry, only admins can use this feature.
}
}
menu * {
.Mod Bot set up
..Set Mod Bot Owner: { set %mbotowner $?="What Nick Would You Like As Mod Bot Owner?" | echo -a Mod Bot Owner Is Now Set As %mbotowner }
..Set Mod Bot Channel: { set %mbotchan $?="What Channel Would You Like Set For Mod Bot?" | echo -a Mod Bot Channel Is Now Set As %mbotchan }
}