coSAM Protection System v1.5 (c) 2003 by Nutmeg3D
http://www.cosam.de/ for updates
Webmaster@cosam.de for Bug Report

The "coSAM Protection System" Script v1.5
Take a look at the end of this file to see update notes.

Installation
----------------

Copy the file "coSAMProtectionSystem.mrc" into your mIRCDir or wherever you want to have it, run mIRC (if it's not already opened) and type
"/load -rs coSAMProtectionSystem.mrc" without the ". This only works if the script is in your mIRCDir, otherwise you'll have to write the
full path before the script name (e.g. /load -rs C:\cool\coSAMProtectionSystem.mrc). Hit enter afterwards.
If all worked well the Script is now loaded and an InfoBox appears. Close it with Ok. Then the Config Dialog appears where you have to set up 
the paths for the 2 config files the script uses (one for the protected masks, and one for the excluded ones). A third config file for your 
main settings is added automatically in your mIRCDir (protsys.ini). After setting the config-file-paths the main dialog appears where you 
can configure your settings (read below for detailed information). A click on "- Done -" closes the Dialog. It can be re-opened throught 
the Channel Menu. Look for item: coSAM Protection System

What does the script do ? And what are the features ?
-----------------------------------------------------

coSAM Protection System 1.5 by Nutmeg3D is a script which manages a list of protected masks (which you can add yourself in each allowed
wildcard format), and punishes everyone who does anything bad to the people who match that masks. You could say, it's a (very powerful)
extension to mIRC's usual protection list. The Protection includes support for: Deops, Devoices, Kicks, Bans and "auto op on join" and
"auto op on op". The last 2 protections are no protections in that case, its just an auto op feature for the masks which are on your
protection list.
A little example of the script features:
you've added mask *milka*!*@* to your protection list. now someone deops a user that is named Milkaboy. The Script notes that this user is
on your protection list and takes revenge on the guy who deopt Milkaboy. At the same time you Re-Op Milkaboy. The other Protections are
similar:

Deop - You ReOp the Protected user and -o+b kick the attacker
Devoice - Yor ReVoice the protected user and kick the attacker
Kick - You kick the one who kicked your protected friend
Ban - You unban the protected user and -o+b kick the attacker
Join - If anyone joins who's mask is on your protection list, he gets opped by you
Op - If you get op in a channel where you were opless and there is anyone in that chan who is on your protection list, you op them with you

of course you can turn off the protections you dont want to use.
It's also possible to change the Punishment Types for each of the Protections. e.g. if you don't want the attacker to get banned when he deops
one of your protected users, you can change this settings into Kick or Deop, just like you need it. This can be done via Tab 2's Combo Box
at the bottom of the dialog. Just choose a protection and definde the punishment type via the radio buttons below.

Ok, so far so good, but what if YOU want to deop your protected user ? Do you punish yourself ? Well for that case i added an "exclusion list"
to this script, where you can add any wildcard mask which is allowed to do with your protected users whatever they want. So if you protect
*Milka*!*@* and add Nutmeg!*@* to the protection list, nutmeg is allowed to deop, kick or do anything else with Milkaboy, a user named Nutmeg3D
would get punished by the protection script :D

So you can easily manage a lot of users which you want to protect and add people who are excluded

Another feature is the "Channels Exclusion list". If you don't want the script to work in #help e.g. you can add this chan on the second tab,
by typing it into the editbox and pressing "Add" button. Now are all protections disabled for that channel.

And another last one: The "auto Ban on too many kicks" option on tab ADVANCED: If more users have loaded this script into their mIRC's and they
have the kick protection turned on, and one of you starts to kick, you kick each other again and again, theres no end. This feature allows you
to ban the attacker after a configurable number of kicks, so the war has an end. You can change the number of kicks that is needed for a ban
and the time in which it shall happen. e.g if you set the settings to 5 and 30 everyone will be banned who kicks you 5 times in 30 seconds.


The Dialog
-------------------------------------------------------------

TAB 1: Settings
Contains:

ListBox1 - This Box placed on the left side of the dialog contains your protected masks. You can select a mask by left clicking it. New masks
           are added at the bottom of the list

ListBox2 - This Box placed on the right side of the dialog contains your excluded masks. You can select a mask by left clicking it. New masks
           are added at the bottom of the list

Add Button 1 - Any mask which is typed in EditField1 will be placed into your Protection list when you click that (left) add button

Add Button 2 - Any mask which is typed in EditField2 will be placed into your Exclusion list when you click that (right) add button

Remove Button 1 - Select a mask from your protection list (Left) and click onto this (left) remove button to delete an entry from your protection list

Remove Button 2 - Select a mask from your exclusion list (Right) and click onto this (right) remove button to delete an entry from your exclusion list

Done Button - Closes the dialog

CheckBox "Join Op" - Activate or Deactivate "auto op on join" feature
CheckBox "Friend Op" - Activate or Deactivate "auto op on op" feature
CheckBox "Deop Prot" - Activate or Deactivate Deop Protection
CheckBox "Devoice Prot" - Activate or Deactivate Devoice Protection
CheckBox "Kick Prot" - Activate or Deactivate Kick Revenge
CheckBox "Ban Prot" - Activate or Deactivate Ban protection

EditField 1 - Add new masks for the Protection list in here and click button Add (left)
EditField 2 - Add new masks for the Exclusion list in here and click button Add (right)

Link to coSAM Homepage - Opens the coSAM Website (www.cosam.de)

TAB2: Advanced
Contains:

ListBox3 - This Box is the Channel Exclusion list, where you can add the channels you want to exclude.

Add Button 3 - Any channel which is typed in EditField3 will be added to the Channel Exclusion List

EditField 3 - Add new channels to the Channel Exclusion list

ComboBox1 - Choose one out of 4 Protections (DeVoice, DeOp, Kick, Ban) and select the Punishment that shall be taken for each of them.
RadioButtons 1-3 - Use them to choose the punishment type (Deop, Kick or Ban)

2 EditFields for the Number of kicks, and the KickTime
2 Buttons that change the number in the 2 editfields

Recover Button - Recovers the config files and resets the lists


Appendix
-------------------------------------------------------------

The following known problems are no "bugs" but things you should keep an eye at:

The three config files "protsys.ini" "protsys1.cfg" and "protsys2.cfg" are being removed if you unload the script. So if you want a 
backup of these files copy them into a different directory

Remember that this script might cause a lot of problems in a chan where everyone protects each other, for example someone kicks a user
which is Kick protected by you; you revenge-kick the attacker; but the attacker is also protected by another Script user and so its an
endless kicking which can only be stoppt by parting the chan, closing mirc or deactivating the kick protection. be careful
In this new version you can use the "auto ban on too many kicks" feature to prevent that.

the "auto op on op" feature may cause some lags if you've added too much protected users (too much means around 20 ore more) and they're
all in a chan where you get op. turning on the flood protection helps out

never edit the config files manually if you don't know that you're doing !


<Nutmeg3D>

Support? Ideas? Bugs?

www.cosam.de
#cosam @ Quakenet
Webmaster@cosam.de

Version History - Update Notes
------------------------------

v1.0
----
* First Public Script release !


v1.1
----
* Script is now a .mrc file with extern .ini


v1.2   
----
* Added Channel Exclusion List
* Added "auto ban on too many kicks" feature
* Addedand recover features
* Added Info Dialog on load
* Fixed a bug where the Script wasn't able to write the Config Files if there was a space in the path (e.g. c:\my mIRC)
* Added Tab 2 to Dialog
* Re-Designed some Dialog items


v1.3
----
* Bugfix: When someone who was not in the chan (ChanServ e.g.) banned/deoped/voiced someone of your protected users the script went crazy 
  and punished your protected users instead of the attacker. That's now fixed. If now someone deops/kicks/etc. you who is not in the chan, 
  simply nothing happens.

* Improved the Ban Protection. It has now wildcard support for masks that are not mentioned in the protection list, but match one of them
  (means that if you now protect Nutmeg3D!*@* and Nutmeg3D's host would be i.am.so.cool and someone would ban *!*@*.so.cool it will detect 
  that this host matches one of your protected users and take revenge.

v1.4
----
* Little Improvement with the "auto op on op" feature. It now ops 6 person at once (+oooooo) instead of separating everyone like before. That
  caused heavy lags. Of course it only ops 6 persons if there are so much you did protect and they're in the chan :D

* Little Bugfix: The two "auto ban on too many kicks" variables are now being removed aswell when unloading the script.

v1.5
----
* Redesigned the "Advanced" Tab

* New feature: It's now possible to choose the punishment for each of the protections as you want them ( only for DeVoice, DeOp, Kick and Ban 
  Protection ). For each of them either Deop, Kick or Ban can be chosen as punishment.

* This new settings have been added to tab 2 ("Advanced") and can be configured via a ComboBox and 3 Radio Buttons.