; TrollBane.mrc v1.4 (c) 1999,2000 by Frank J. Perricone, hawthorn@sover.net ; ; Please feel free to distribute this script at will and use freely. ; Do not modify without my permission; do not claim credit for my work. ; ; This script stops unsolicited messages from anyone you haven't explicitly given ; permission to. (This puts them on your Users list at level 2, so if you already have ; folks there at any level 2 or up, they automatically have permission.) It's very ; configurable and entirely menu-driven. ; ; History: ; 1.0: initial release, 12-13-1999 ; 1.1: added setting the messages, unsetting all variables on unload, 12-16-1999 ; 1.2: combined Allow and Deny into a new Permissions menu ; reworded to Grant and Remove to make clearer what it's actually doing ; added a List command to the permissions menu ; switched to using a named permission so it won't conflict with other scripts; ; note that this means you need to rebuild your user list when upgrading from ; earlier versions of Troll Bane ; updated Help to reflect all these changes ; when Unloading, you can choose whether to save your settings and user list; ; if you do, it'll use them next time you load; if not, it'll clear them from your system ; added a version check to make sure the user has mIRC v5.6 or better. ; released 12-20-1999 ; 1.3 added CTCP VERSION reply, made some fixes for mIRC v5.7 ; released 02-03-2000 ; 1.4 added an ON START to remind the user that Troll Bane is loaded on 1:load: { if ( $version < 5.6 ) { echo This script requires mIRC v5.6 or better. Please download the latest version at http://www.mirc.com/ and then reload it. unload -rs $script halt } if ( %trollbane_enabled == $null ) { set %trollbane_enabled on set %trollbane_warnings on set %trollbane_inform on set %trollbane_tellallow off set %trollbane_ignore 0 set %trollbane_color $colour(info) set %trollbane_review1 (nothing yet) set %trollbane_review2 (nothing yet) set %trollbane_review3 (nothing yet) set %trollbane_allowmsg I've given you permission to msg me. set %trollbane_informmsg Your unsolicited msg was automatically closed by Troll Bane. Please ask for permission in channel before msging me again. .saveini } .ial on echo %trollbane_color -ai5t * Welcome to Troll Bane! All private msg windows will be blocked unless you use the Troll Bane menu to Allow the person to msg you, or you msg them first. All settings are controlled by the Troll Bane item on the nick-list menu, and you can get Help there. } on 1:start: { if ( %trollbane_enabled = on ) { echo %trollbane_color -ai5t * Troll Bane: Enabled. } else { echo %trollbane_color -ai5t * Troll Bane: Disabled. } } menu nicklist,query { Troll Bane .Permissions ..Grant By Nick: { auser -a trollbane $$1 if ( %trollbane_tellallow = on ) notice $$1 %trollbane_allowmsg } ..Grant By Address: { guser -a trollbane $$1 3 if ( %trollbane_tellallow = on ) notice $$1 %trollbane_allowmsg } ..- ..Remove By Nick:/ruser trollbane $$1 ..Remove By Address:/ruser trollbane $$1 3 ..- ..List:/ulist trollbane .Review Trolls: { echo %trollbane_color -ai5t * Troll Bane: Last three troll msgs killed were: echo %trollbane_color -ai5tlbf     %trollbane_review1 echo %trollbane_color -ai5tlbf     %trollbane_review2 echo %trollbane_color -ai5tlbf     %trollbane_review3 } .- .Enable/Disable: { if ( $?!="Enable Troll Bane?" = $true ) { set %trollbane_enabled on echo %trollbane_color -ai5t * Troll Bane: Enabled. } else { set %trollbane_enabled off echo %trollbane_color -ai5t * Troll Bane: Disabled. } .saveini } .Unload:{ if ( $?!="Unload Troll Bane?" = $true ) { echo %trollbane_color -ai5t * Troll Bane: Unloading. Type /load -rs trollbane.mrc to reload. if ( $?!="Unload settings and user list too?" = $true ) { unset %trollbane_* rlevel trollbane } unload -rs $script } } .Settings ..Display Kills: { if ( $?!="Tell you when a msg is killed?" = $true ) { set %trollbane_warnings on echo %trollbane_color -ai5t * Troll Bane: Display Kills on. } else { set %trollbane_warnings off echo %trollbane_color -ai5t * Troll Bane: Display Kills off. } .saveini } ..Inform Troll About Kills: { if ( $?!="Tell the troll when a msg is killed?" = $true ) { set %trollbane_inform on echo %trollbane_color -ai5t * Troll Bane: Inform Troll on. } else { set %trollbane_inform off echo %trollbane_color -ai5t * Troll Bane: Inform Troll off. } .saveini } ..Message Text On Informing Troll: { var %new_informmsg set %new_informmsg $?="Message to send when informing trolls: $crlf $+ (Current message: ' $+ %trollbane_informmsg $+ ')" if ( %new_informmsg = $null ) halt set %trollbane_informmsg %new_informmsg echo %trollbane_color -ai5t * Troll Bane: Message when informing trolls: %trollbane_informmsg $+ . .saveini } ..Ignore Troll: { var %new_ignore set %new_ignore $?="Seconds to ignore trolls (0 for none):" if ( %new_ignore = $null ) halt if ( %new_ignore < 0 || %new_ignore > 86400 ) { echo %trollbane_color -ai5t * Troll Bane: Invalid ignore time %new_ignore ignored. halt } set %trollbane_ignore %new_ignore if ( %trollbane_ignore = 0 ) { echo %trollbane_color -ai5t * Troll Bane: Ignore Troll off. } else { echo %trollbane_color -ai5t * Troll Bane: Ignore trolls for %trollbane_ignore seconds. } .saveini } ..Tell When Giving Permission: { if ( $?!="Tell someone when you give them permission?" = $true ) { set %trollbane_tellallow on echo %trollbane_color -ai5t * Troll Bane: Tell When Giving Permission on. } else { set %trollbane_tellallow off echo %trollbane_color -ai5t * Troll Bane: Tell When Giving Permission off. } .saveini } ..Message Text On Giving Permission: { var %new_allowmsg set %new_allowmsg $?="Message to send when giving permission: $crlf $+ (Current message: ' $+ %trollbane_allowmsg $+ ')" if ( %new_allowmsg = $null ) halt set %trollbane_allowmsg %new_allowmsg echo %trollbane_color -ai5t * Troll Bane: Message when giving permission: %trollbane_allowmsg $+ . .saveini } ..Text Color: { var %new_color set %new_color $?="Choose a color for Troll Bane messages (0-15):" if ( %new_color = $null ) halt if ( %new_color < 0 || %new_color > 15 ) { echo %trollbane_color -ai5t * Troll Bane: Invalid color %new_color ignored. halt } set %trollbane_color %new_color echo %trollbane_color -ai5t * Troll Bane: Color set to %trollbane_color $+ . .saveini } ..- ..Show Settings: { echo %trollbane_color -ai5t * Troll Bane: Settings are: echo %trollbane_color -ai5t     Enabled: %trollbane_enabled echo %trollbane_color -ai5t     Display Kills: %trollbane_warnings echo %trollbane_color -ai5t     Inform Troll: %trollbane_inform (" $+ %trollbane_informmsg $+ ") if ( %trollbane_ignore = 0 ) { echo %trollbane_color -ai5t     Ignore Troll: off } else { echo %trollbane_color -ai5t     Ignore Troll: %trollbane_ignore seconds } echo %trollbane_color -ai5t     Tell When Giving Permission: %trollbane_tellallow (" $+ %trollbane_allowmsg $+ ") echo %trollbane_color -ai5t     Color: %trollbane_color } .- .Help: { window +benstx @trollbane_help 0 0 600 400 echo %trollbane_color -i5 @trollbane_help Troll Bane automatically kills unsolicited messages. Note that it will only kick in when you get a message that opens a query window, so if you're already talking to someone in a query window, it won't stop them from replying. echo %trollbane_color -i5 @trollbane_help   echo %trollbane_color -i5 @trollbane_help All functions are controlled by the Troll Bane menu, found when you right-click a nick on a nick list: echo %trollbane_color -i5 @trollbane_help   echo %trollbane_color -i5 @trollbane_help   Permissions: By default no one has permission to send you msgs unless you Grant it here, by nick or address. You can Remove permission if you change your mind, or List permissions you've granted. echo %trollbane_color -i5 @trollbane_help   Review Trolls: The last three unsolicited msgs you were sent are stored so you can review them. echo %trollbane_color -i5 @trollbane_help   Enable/Disable: Turns Troll Bane's filtering on and off. echo %trollbane_color -i5 @trollbane_help   Unload: Allows you to unload Troll Bane from your system completely. (The file will still be on your hard drive so you can reload it.) echo %trollbane_color -i5 @trollbane_help   Settings: Controls all the operations of Troll Bane. See below for a description of the settings. echo %trollbane_color -i5 @trollbane_help   Help: You're soaking in it! echo %trollbane_color -i5 @trollbane_help   About: Shows the version, contact information, copyright, and redistribution permissions. echo %trollbane_color -i5 @trollbane_help   echo %trollbane_color -i5 @trollbane_help The Settings pop-out menu controls the configuration of Troll Bane. Here are your options: echo %trollbane_color -i5 @trollbane_help   echo %trollbane_color -i5 @trollbane_help   Display Kills: When turned on, Troll Bane shows a message on your active window when an unsolicited msg is killed. echo %trollbane_color -i5 @trollbane_help   Inform Troll About Kills: When turned on, Troll Bane sends a rejection message to the person who sent the unsolicited msg. You can also specify the text with Message Text When Informing Troll. echo %trollbane_color -i5 @trollbane_help   Ignore Troll: Allows you to set Troll Bane to automatically do a temporary ignore on anyone who sends an unsolicited msg. Type a number of seconds, or 0 for no ignore. echo %trollbane_color -i5 @trollbane_help   Tell When Giving Permission: When turned on, automatically sends a notice to someone when you Allow them to send msgs.. You can also specify the text with Message Text When Giving Permission. echo %trollbane_color -i5 @trollbane_help   Text Color: Allows you to change the color of Troll Bane's informative messages. echo %trollbane_color -i5 @trollbane_help   Show Settings: Displays all the Troll Bane settings. } .About: { echo %trollbane_color -ai5 * Troll Bane v1.4 ( $+ $script $+ ) is (c) 1999, 2000 by Frank J. Perricone, hawthorn@sover.net, hawthorn on DalNet, 12http://www.sover.net/~hawthorn/. Please feel free to distribute this script at will and use freely. Do not modify without my permission; do not claim credit for my work. } } on ^*:OPEN:?:*: { if (( %trollbane_enabled = on ) && ( trollbane !isin $level($nick)) && ( trollbane !isin $level($address($nick,3)))) { if ( %trollbane_warnings = on ) echo %trollbane_color -ai5tlbf * Troll Bane: Unsolicited msg from $nick closed. if ( %trollbane_inform = on ) notice $nick %trollbane_informmsg if ( %trollbane_ignore != 0 ) ignore -u $+ %trollbane_ignore $nick set %trollbane_review1 %trollbane_review2 set %trollbane_review2 %trollbane_review3 set %trollbane_review3 < $+ $nick $+ > $1- .saveini halt } } ctcp *:VERSION:.ctcpreply $nick VERSION Troll Bane v1.4 (c) 1999, 2000 by Frank J. Perricone (hawthorn)