ClonesScript README

NOTE 1: If you're viewing this in Notepad, make sure word wrap is on: Format > Word wrap
NOTE 2: Please, PLEASE read the troubleshooting section if you're having trouble... Most problems are answered there.
NOTE 3: Compatibility problems: Running ClonesScript alongside another script will generally not produce any problems.

0.0 - New in this version (1.7)
1.0 - Credits + Contact Info
2.0 - Installation
3.0 - Setup
4.0 - Using The Script
  >4.1 Starting for the first time
  >4.2 Basic commands
  >4.3 Buttons
5.0 - Commands
6.0 - Advanced Tweaks
7.0 - Troubleshooting




[0.0] New in this version (1.7)

The script requires no popups file, and it adds an option to the nick/query popups to check out someone's credentials.

INFO buttons next to names and channels in verbose mode; and double-clicking on a channel name will not give you the channel with a bracket after it.

Neater code practice: The code will work better when upgrading the version. :}











[1.0] Credits + Contact Info
All copyright Ben 'Motig' Bowen. Please respect my credit! :) http://www.moscripts.co.uk is where you'll find forums to post in with questions/comments, but get me on Furnet or Quakenet as 'Motig', or via email at d4y53rp3n753v3n@hotmail.co.uk (yes, it's real. :P) if you want.















[2.0] Installation
Installation is in two parts. Before you do anything, it's recommended that you're not connected to the server. Disconnect if you are. 

First of all, just extract all the files (except this one [readme.txt]) from the .zip or .ace into your mIRC folder (for most people, this is C:\Program Files\mIRC; or if you're using mIRC version 6.3 and up, it's in C:\Documents and Settings\YourUsername\Application Data\mIRC). 

Next, when you start mIRC, type the following two commands into any window, in this order:

/load -a clonesaliasesv1-7.ini
/load -rs clonesremotev1-7.ini


If everything's gone right, when you try and load the 'clonesremotev1-7.ini' file, mIRC will ask you whether you want to allow the script to 'run initialization commands'. Select YES. If you select NO by accident, delete the files and start over.

You should see a message appear, probably in your active window, that says "ClonesScript will initialise 3 seconds" etc. If not, don't worry, but consider making sure you've taken all the steps above correctly. It is still possible, however, that the message doesn't appear, due to your colour scheme. :)














[3.0] Setup

---READ THIS SECTION CAREFULLY---

Use the command /options.c to open up the options dialog. From here, you can edit any of the options. Pressing any of the '?' buttons next to an option in the dialog will bring up the same help text that you see below.

Here is a description of the options, and their possible values:

NB: $true means the check box is checked... $false means it is not (previous version of ClonesScript did not have a dialog box, hence the odd syntax ^^).

Option: Always start on connect?
Change this depending on whether or not you want ClonesScript to start automatically when you connect to a server.
Default is $true
$true = Yes
$false = No

Option: Verbose mode?
If this is set to $true, the script will constantly tell you what it's doing... Whereas if you set it to $false, it will only tell you about crucial information. Set to $false if you find it's delivering too much information.
Default = $true
$true = Yes
$false = No

Option: Minimum quote length?
Use this to set the minimum number of characters a message has to be before the script will save it as a quote. For example, if the limit is set to 10, and I write a message 123456789, my message won't be saved as a quote. The reason for this is to stop messages like 'hi' and 'lol' getting saved. :)
Default = 30
Set this to any positive whole value.
0 = All messages will get through

Option: Auto-save time?
This determines, in seconds, how often the script auto-saves the database of usernames, hostmasks, quotes, channels and everything else.
Default = 300
Set this to any positive whole value.
0 = Auto-saving disabled

Option: Default command?
This is the command you'll always have written out for you at the bottom of the @clones window. Some people might prefer /info.c as their default command. :)
Default = /search.c
Set this to anything, it doesn't even have to be a ClonesScript command. :)

Option: Search result protection limit?
If you search for something like 'e' in the database, you'll get every username you've ever seen with the letter 'e' in it. The protection limit is the maximum number of results that will be shown to you before the script pauses and asks you if you want to see the rest... It means you won't get flooded with 10,000 usernames. :)
Default = 50
Set it to any positive whole number.

Option: Default window font?
This is the font that is used by defualt in the @clones window.
Default = Arial
Any font supported by mIRC can go here.

Option: Show search button at the end of every whois?
If you set this to $true, there will be a button after the end of every /whois command, that you can click to see information about the person you just /whois'd. It can look rather annoying though, so it's set by default to $false.
Default = $false
$true = Yes
$false = No

Option: Display whois information in status window or active (current) one? NOTE: Must be -s or -a!
By default, mIRC shows /whois information in the status (connection) window... However, ClonesScript shows it in the window you're currently on, instead. If you prefer it in the status window, change this option to -s.
Default = -a
-a = Current (active) window
-s = Status (connection) window

Colours:
Just like with the option settings, changing the colours can be done with the options dialog. READ THE NOTE BELOW:

IMPORTANT NOTE:

YOU M-U-S-T LEAVE ALL COLOUR CODES AS DOUBLE DIGITS... SO 5 MUST INSTEAD BE 05!

An mIRC bug causes scripts to act erraticaly when single-digit colour codes are used. There is nothing that can be done about this.

Colour: Second whois colour
The colour used primarily for names in /whois information.
Default = 05

Colour: Script info
The colour used by the script to tell you what it's doing.
Default = 14

Colour: Script success
The colour used by the script to tell you that it finished what it was doing without any hiccups.
Default = 03

Colour: Script error
The colour used by the script to tell you that it has hit a problem.
Default = 04

Colour: User error
The colour used by the script to tell you that you made a mistake.
Default = 05

Colour: Warning
The colour used by the script to warn you that something has the potential to go wrong.
Default = 08,05

Colour: Event
The colour used by the script when something happens (such as someone talking in a channel).
Default = 06

Colour: Event 2
The second colour used by the script when something happens.
Default = 13

Colour: Buttons
The colour used for all double-clickable buttons.
Default = 02,10

Colour: Search results
The colour used by the script to display search results.
Default = 10

Colour: Search results 2
The second colour used by the script to display search results.
Default = 12

Colour: Debug
A rarely used colour that is only used by the script to try and tell you what it's doing when something goes wrong.
Default = 12

Colour: Misc
The colour used for all other text that doesn't fall into a different category.
Default = 01


































[4.0] Using the Script

>4.1 Starting for the first time

If you've installed everything correctly, when you connect to a server, CloneScript should start within 3 seconds (give or take 10 >.>). If it doesn't, try entering "/start.c" in any window. This could be caused by a number of things... See the troubleshooting section for more help.

Once the script is started, a window entitled @clones should appear, and you should see the following lines:

 ---------------------------------------------------------------------------
 ClonesScript v1.7 copyright Ben 'Motig' Bowen; first run...
 Script appears to be installed correctly!
 http://www.moscripts.co.uk
 Thankyou for using ClonesScript. :) Check our website regularly for updates and info.
 Also, be sure to read the readme.txt that came with the download!
 /help.c gives a list of commands.
 ---------------------------------------------------------------------------

Above these lines is a print out of all your options settings. Here you can check that everything is configured how you want. Also, on the first time you start up the script, the options box will appear.


>4.2 Basic commands

If you have installed the clonespop.txt file correctly, you can perform all of these commands by right clicking in the @clones window... However, it can be useful to know these commands, too:

"/info.c" followed by a username will give you all the information you need about that username. Example: "/info.c Motig" would give you all the information about Motig.
"/search.c" followed by a phrase will show you all the usernames in the database that contain that phrase. Example: "/search.c tig" will match Motig, Tiger, and Bigredtiger (because the phrase 'tig' is found in all three).

The search command is actually very powerful, and has various tools for refining your search. See the commands section for more info.

>4.3 Buttons

There are clickable buttons in the script, and by double clicking on any of them you can easily and quickly perform many various tasks. The buttons and their functions are as thus:

CONFIRM: This button is used to override warning messages.
INFO: Double click this button to perform an /info.c command on the user it is labelled on.
LOCK/UNLOCK: These buttons lock/unlock quotes. See the advanced tweaks section for more info.
RESTORE: This is a confirmation button used with /restore.c.
IMPORT: A confirmation button for /import.c.
OVERRIDE: This button is used to override the search result limiter.
ADD-CHANNEL: This button is shown next to a username with the /info.c command. Double click on it to manually add a channel that you know the user has visited to the database.
ADD-QUOTE: Like ADD-CHANNEL, but used to add a quote, instead (duh XD).
ADD-ALIAS: Add an alias (an alternative nick) that you know someone uses/used. If the alias to be added is linked with other aliases, you'll be asked if you want to put all of them together, or just the one you're adding.
CLONESINFO: This button is only seen if you've enabled the /whois button in the setting. Double-click it to bring up the @clones window with all the information on the /whois'd user.






































[5.0] Commands

A brief list of commands can be found by typing the command /help.c

NB: A lot of these commands can be performed a lot easier and quicker by right-clicking on the @clones window, provided you have installed the script correctly, including the clonespop.txt file.


Here, the commands are in alphabetical order.

/backup.c
Use this command to backup the database to the backup files. This is theoretically done automatically every time to close mIRC, but it should be done manually once in a while just in case.

/export.c
Use this command to export the entire database to five files into your mIRC folder. They will all be prefixed with "export_db_". You can use this function if you wish to transfer your database from one PC to another, for example.

/help.c
Gives a brief list of commands.

/import.c
Use this to import exported files. You MUST have all five exported files in your mIRC directory.

/info.c [username]
A key command: Use this to see all the information you currently have in the database about the user with nick [username]. For example, to see all the info about 'Motig', you'd type "/info.c Motig".

/options.c
Opens up the options dialog.

/quote.c [username] [quote#]
Use this without a [quote#] to see a random quote by [username].
To see a specific quote number, use it with a [quote#]. Examples:
"/quote.c Motig" will bring up a random quote by Motig, and "/quote.c Motig 14" will bring up quote nubmer 14 by Motig.

/restore.c
Use this if one day your main database appears to have corrupted. It will restore the database from the backup files.

/save.c
This command is performed automatically as long as you haven't set the auto-save time to 0 (default is once every 300 seconds [5 mins]). However, if you feel like you want to be on the safe side, or you HAVE disabled the auto-save, this command will save the main database. In theory, this command is supposed to run every time you exit mIRC, too.

---------

/search.c
A very powerful command, this will search the entire database for whatever you choose to search for. The syntax is as follows:

"/search.c blah" - This will search every known username in the database and show you all of them that contain the phrase 'blah'.
"/search.c *blah" - This will search every known username in the database and show you all of them that END in the phrase 'blah'. Notice the asterisk (*) is at the front.
"/search.c blah*" - This will search every known username in the database and show you all of them that START in the phrase 'blah'. Notice the asterisk (*) is at the end.
"/search.c *blah*" - This is the same as putting "/search.c blah".

All of the above techniques with the asterisk (*) can be applied to the following, too:

"/search.c H blah" - By putting a single letter 'H' infront, you will be searching through hostmasks instead of usernames.

"/search.c Q blah" - By putting a single letter 'Q' infront, you will be searching through quotes.



"/search.c C #channelname" - By putting a single letter 'C' infront, you can search for all users that have EVER been seen by you in #channelname.

NB: If you search without any preceding letters, so that's without the 'H', 'Q', or 'C', but you still include a dot in your search string (that's the blah part), you'll still be searching through hostnames. Example: "/search.c *.com" is the same as "/search.c H *.com".

---------

/start.c
This will start the script manually if it won't start on it's own, or you've chosen to turn off auto-starting.

/stats.c
Some simple stats about how many entries you have in your database.

/stop.c
This is the opposite of /start.c... It will stop the script.















[6.0] Advanced tweaks

---THESE TWEAKS ARE FOR ADVANCED USERS ONLY---

Locking a quote will mean it will not be overwritten, and it will always be shown when you use either the /info.c or /quote.c commands. Lock a quote by using the 'lock' button next to it.

Setting the option 'Display whois information in status window or active (current) one?' to anything but -a or -s could work. If you wanted to display all your whois information in a window, e.g. @whois, you could create the window, and set this option to @whois.

Editing the popup file is easy. If you know how to script mIRC popups, and want to add some other commands to the file, right click the window, and select 'Edit popups'. Just be sure to save once you're done.

To manually edit a record in the database, you can open any of the database files in the mIRC folder. All are prefixed with the letters 'db' (e.g. 'dbial' for the hostmasks and usernames). Use Wordpad, not Notepad. Note: The files that end in the letter 'b' are the backup files. It is recommended you do not edit these.






















[7.0] Troubleshooting

> The script won't start when I connect, even if the auto-start option is set to $true
  
  If you have to use /start.c to manually start the script; it's possible that ClonesScript is clashing with another script.    A way around this would be to add the line '/.timer 1 3 /start.c' into your 'perform' section.

  If the script won't start atall, it has most likely been installed wrongly. Make sure you've read section 2.0 throughly.


> I keep getting 'empty' quotes

  This is a known bug with the script at the moment... I'm working on it. ;) In the meantime, use /req.c to remove them. 


> The script seems to keep on being unable to find a user's hostmask

  The way IRC works means that this will always happen every now and then.


These are all the known bugs so far. If you find anymore, contact me with the info at the top. I'll most likely know what's going wrong. :) Thanks!






