ClonesScript — File Browser
ClonesScriptv1.7 / ClonesScriptv1.7 / clonesaliasesv1-7.ini
clonesaliasesv1-7.ini — 39.35 KB — Download this file
[aliases]
n0=; ClonesScript for mIRC copyright Ben 'Motig' Bowen.
n1=; Please respect my credit. :)
n2=;
n3=; This part should be in the 'aliases' section.
n4=; Options configurable below. Once options have been edited, /options.c must be run before they will take effect.
n5=
n6=/options.c {
n7= if (%firstrun.c != $false) {
n8= ; Option: Always start on connect?
n9= /set %asoc.c $true
n10= ; Option: Verbose mode?
n11= /set %verbose.c $true
n12= ; Option: Minimum quote length?
n13= /set %mql.c 30
n14= ; Option: Auto-save time?
n15= /set %ast.c 300
n16= ; Option: Default command?
n17= /set %default_command.c /search.c
n18= ; Option: Search result protection limit?
n19= /set %srpl.c 50
n20= ; Option: Default window font?
n21= /set %dwf.c Arial
n22= ; Option: Show search button at the end of every whois?
n23= /set %ssb.c $false
n24= ; Option: Display whois information in status window or active (current) one? NOTE: Must be -s or -a!
n25= /set %aos.c -a
n26= ; Colour: Second whois colour
n27= /set %c.swc.c 05
n28= ; Colour: Script info
n29= /set %c.script_info.c 14
n30= ; Colour: Script success
n31= /set %c.script_success.c 03
n32= ; Colour: Script error
n33= /set %c.script_error.c 04
n34= ; Colour: User error
n35= /set %c.user_error.c 05
n36= ; Colour: Warning
n37= /set %c.warning.c 08,05
n38= ; Colour: Event
n39= /set %c.event.c 06
n40= ; Colour: Event 2
n41= /set %c.event2.c 13
n42= ; Colour: Buttons
n43= /set %c.button.c 02,10
n44= ; Colour: Search results
n45= /set %c.sr.c 10
n46= ; Colour: Search results 2
n47= /set %c.sr2.c 12
n48= ; Colour: Debug
n49= /set %c.debug.c 13,05
n50= ; Colour: Misc
n51= /set %c.misc.c 01
n52= }
n53= if ($1 == SILENT) return
n54= if ($1 == STARTUP) {
n55= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n56= /echo @clones %c.misc.c Options
n57= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n58= /echo @clones %c.misc.c Always start on connect: %asoc.c
n59= /echo @clones %c.misc.c Verbose mode: %verbose.c
n60= /echo @clones %c.misc.c Minimum quote length: %mql.c
n61= /echo @clones %c.misc.c Auto-save time: %ast.c
n62= /echo @clones %c.misc.c Default command: %default_command.c
n63= /echo @clones %c.misc.c Search protection limit: %srpl.c
n64= /echo @clones %c.misc.c Default font: %dwf.c
n65= /echo @clones %c.misc.c ------------------------------------
n66= /echo @clones %c.script_info.c >>>Script info colour
n67= /echo @clones %c.script_success.c >>>Script success colour
n68= /echo @clones %c.script_error.c >>>Script error colour
n69= /echo @clones %c.user_error.c User error colour
n70= /echo @clones %c.warning.c Warning colour
n71= /echo @clones %c.event.c Event colour
n72= /echo @clones %c.event2.c Event colour 2
n73= /echo @clones %c.button.c Button colour
n74= /echo @clones %c.sr.c Search results colour
n75= /echo @clones %c.sr2.c Search results colour 2
n76= /echo @clones %c.debug.c Debug colour
n77= /echo @clones %c.swc.c Second whois colour
n78= /echo @clones %c.misc.c Misc colour
n79= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n80= return
n81= }
n82= /set %c.swc.temp.c %c.swc.c
n83= /set %c.script_info.temp.c %c.script_info.c
n84= /set %c.script_success.temp.c %c.script_success.c
n85= /set %c.script_error.temp.c %c.script_error.c
n86= /set %c.user_error.temp.c %c.user_error.c
n87= /set %c.warning.temp.c %c.warning.c
n88= /set %c.event.temp.c %c.event.c
n89= /set %c.event2.temp.c %c.event2.c
n90= /set %c.buttons.temp.c %c.buttons.c
n91= /set %c.sr.temp.c %c.sr.c
n92= /set %c.sr2.temp.c %c.sr2.c
n93= /set %c.debug.temp.c %c.debug.c
n94= /set %c.misc.temp.c %c.misc.c
n95= /dialog -m options.c options.c
n96= if (%asoc.c == $true) /did -c options.c 202
n97= if (%verbose.c == $true) /did -c options.c 203
n98= if (%ssb.c == $true) /did -c options.c 204
n99= /did -a options.c 206 %mql.c
n100= /did -a options.c 208 %ast.c
n101= /did -a options.c 210 %srpl.c
n102= /did -a options.c 212 %default_command.c
n103= /did -a options.c 214 %dwf.c
n104= /did -a options.c 216 %aos.c
n105= /did -a options.c 302 Second whois colour
n106= /did -a options.c 302 Script info colour
n107= /did -a options.c 302 Script success colour
n108= /did -a options.c 302 Script error colour
n109= /did -a options.c 302 User error colour
n110= /did -a options.c 302 Warning colour
n111= /did -a options.c 302 Event colour
n112= /did -a options.c 302 Event colour 2
n113= /did -a options.c 302 Button colour
n114= /did -a options.c 302 Search results colour
n115= /did -a options.c 302 Search results colour 2
n116= /did -a options.c 302 Debug colour
n117= /did -a options.c 302 Misc colour
n118=}
n119=/addchan.c {
n120= if ($regex($hget(cha.c,$1),$2) > 0) {
n121= if ($3 = M) /echo @clones %c.user_error.c $2 is already in $1 $+ 's channel list!
n122= return
n123= }
n124= else {
n125= /hadd -m cha.c $1 $hget(cha.c,$1) $4 $+ $2
n126= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added channel $4 $+ $2 for $1
n127= }
n128=}
n129=/addquote.c {
n130= if (($hget(quo.c,$1) == $null) || ($len($hget(quo.c,$1)) > 600)) {
n131= if (($gettok($hget(quo.c,$1),1,32) != 0) && ($hget(quo.c,$1) != $null)) {
n132= /echo @clones %c.user_error.c Quotes for $1 are locked, but quotefile is full. Quote not added. :<
n133= return
n134= }
n135= /hadd -m quo.c $1 0 1 $2-
n136= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added quote for $1 ( $+ $len($2-) characters)
n137= }
n138= else {
n139= /hadd -m quo.c $1 $gettok($hget(quo.c,$1),1,32) $calc($gettok($hget(quo.c,$1),2,32) + 1) $gettok($hget(quo.c,$1),3-,32) $2-
n140= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added quote for $1 ( $+ $len($2-) characters)
n141= }
n142=}
n143=/addalias.c {
n144= if ($3 == $true) {
n145= /unset %temp.c
n146= /set %i.c 1
n147= while (%i.c <= $hfind(ial.c,$hget(ial.c,$2),0).data) {
n148= /set %temp.c %temp.c $hfind(ial.c,$hget(ial.c,$2),%i.c).data
n149= /inc %i.c
n150= }
n151= /set %j.c 1
n152= while (%j.c < %i.c) {
n153= /hadd -m ial.c $gettok(%temp.c,%j.c,32) $hget(ial.c,$1)
n154= /echo @clones %c.script_info.c >>>Added alias ' $+ $gettok(%temp.c,%j.c,32) $+ ' for $1
n155= /inc %j.c
n156= }
n157= }
n158= else {
n159= /hadd -m ial.c $2 $hget(ial.c,$1)
n160= /echo @clones %c.script_info.c >>>Added alias ' $+ $2 $+ ' for $1
n161= }
n162=}
n163=/start.c {
n164= if (%ready.c == $true) {
n165= /echo @clones %c.script_error.c >>>Error encountered!
n166= /echo @clones %c.script_error.c >>>Script tried to start, but is already running!
n167= /echo @clones %c.script_error.c >>>ClonesScript can be turned off with /stop.c
n168= /halt
n169= }
n170= /set %vers.c v1.7
n171= /window -e @clones %default_command.c %dwf.c
n172= if ($exists($scriptdir $+ dbial) == $true) /set %firstrun.c $false
n173= if (%firstrun.c == $false) /echo @clones %c.script_info.c >>>Loading database
n174= if (%firstrun.c != $false) /echo @clones %c.script_info.c >>>First run: Creating database
n175= /hfree -w *.c
n176= /hmake ial.c
n177= if (%firstrun.c == $false) /hload ial.c dbial
n178= /hmake cha.c
n179= if (%firstrun.c == $false) /hload cha.c dbcha
n180= /hmake cou.c
n181= if (%firstrun.c == $false) /hload cou.c dbcou
n182= /hmake quo.c
n183= if (%firstrun.c == $false) /hload quo.c dbquo
n184= /hmake dat.c
n185= if (%firstrun.c == $false) /hload dat.c dbdat
n186= if (%firstrun.c == $false) /echo @clones %c.script_info.c >>>Database loaded
n187= if (%firstrun.c != $false) /echo @clones %c.script_info.c >>>Database created
n188= /set %ready.c $true
n189= if (%last_save.c == $null) /set %last_save.c Never
n190= if (%last_backup.c == $null) /set %last_backup.c Never
n191= /options.c STARTUP
n192= if (%firstrun.c != $false) {
n193= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n194= /echo @clones %c.misc.c ClonesScript %vers.c copyright Ben 'Motig' Bowen; first run...
n195= /echo @clones %c.misc.c Script appears to be installed correctly!
n196= /echo @clones %c.misc.c http://www.moscripts.co.uk
n197= /echo @clones %c.misc.c Thankyou for using ClonesScript. :) Check our website regularly for updates and info.
n198= /echo @clones %c.misc.c Also, be sure to read the readme.txt that came with the download!
n199= /echo @clones %c.misc.c /help.c gives a list of commands.
n200= /echo @clones %c.misc.c IMPORTANT: If you have upgraded from a previous version of ClonesScript, but have forgotten to export the database first, use /restore.c NOW to try and recover your data. Otherwise, use /import.c as normal.
n201= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n202= }
n203= else {
n204= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n205= /echo @clones %c.misc.c ClonesScript %vers.c copyright Ben 'Motig' Bowen.
n206= /echo @clones %c.misc.c http://www.moscripts.co.uk ¦ http://avorea.byethost9.com/ClonesScript/
n207= /echo @clones %c.misc.c /help.c gives a list of commands.
n208= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n209= }
n210= if (%firstrun.c != $false) /options.c
n211= /set %firstrun.c $false
n212= if (%ast.c > 0) /.timerASC 0 %ast.c /save.c AUTO
n213= if (%ast.c < 1) /echo @clones %c.warning.c Warning: Auto-save has been turned off! /save.c to manual save.
n214= /echo @clones %c.script_success.c >>>ClonesScript has initialised succesfully
n215= /hadd -m cou.c TEMP TEMP
n216= return
n217= :error
n218= /set %ready.c $false
n219= /.timerASC off
n220= /echo @clones %c.script_error.c >>>Error encountered! $error
n221= /echo @clones %c.script_error.c >>>Initialisation error: Try reloading the database from backups! /backup.c
n222= /echo @clones %c.script_error.c >>>ClonesScript has been turned off. /start.c to restart.
n223= /halt
n224=}
n225=/stop.c {
n226= if (%ready.c == $false) {
n227= /echo @clones %c.script_error.c >>>Error encountered!
n228= /echo @clones %c.script_error.c >>>Script tried to stop, but is already stopped!
n229= /echo @clones %c.script_error.c >>>ClonesScript can be turned on with /start.c
n230= /halt
n231= }
n232= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Stopping script...
n233= /set %ready.c $false
n234= /.timerASC off
n235= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Saving database...
n236= /hsave ial.c dbial
n237= /hsave cha.c dbcha
n238= /hsave cou.c dbcou
n239= /hsave quo.c dbquo
n240= /hsave dat.c dbdat
n241= /set %last_save.c $date $time
n242= /echo @clones %c.script_success.c >>>ClonesScript has stopped succesfully
n243= return
n244= :error
n245= /set %ready.c $false
n246= /.timerASC off
n247= /echo @clones %c.script_error.c >>>Error encountered! $error
n248= /echo @clones %c.script_error.c >>>ClonesScript has tried to manually turn itself off. /stop.c to retry or /start.c to restart.
n249= /echo @clones %c.script_error.c >>>However, running /start.c now has a high risk of overwriting the database. Use /save.c first.
n250= /halt
n251=}
n252=/stats.c {
n253= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n254= /echo @clones %c.misc.c Database Stats
n255= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n256= /echo @clones %c.misc.c $hget(ial.c,0).item nicks with hostmasks.
n257= /echo @clones %c.misc.c $hget(dat.c,0).item nicks with last seen dates.
n258= /echo @clones %c.misc.c $hget(cha.c,0).item nicks with channel lists.
n259= /echo @clones %c.misc.c $hget(quo.c,0).item nicks with quotes.
n260= /echo @clones %c.misc.c Last primary save at %last_save.c $+ .
n261= /echo @clones %c.misc.c Last backup at %last_backup.c $+ .
n262= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n263=}
n264=/help.c {
n265= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n266= /echo @clones %c.misc.c ClonesScript Command List - ClonesScript %vers.c - See readme.txt for full instructions
n267= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n268= /echo @clones %c.misc.c >> Database searching
n269= /echo @clones %c.misc.c >> >> /search.c [wildtext] ¦ Searches the database for all usernames matching the wildtext. E.g. '/search.c *tig*' would find 'Motig', 'Tiger', and 'Bigtiger'.
n270= /echo @clones %c.misc.c >> >> /search.c H [wildtext] ¦ Searches the database for all hostmasks matching the wildtext. E.g. '/search.c H *.com' would find every hostmask that ended in '.com'.
n271= /echo @clones %c.misc.c >> >> /search.c Q [wildtext] ¦ Searches the database for all quotes matching the wildtext. E.g. '/search.c Q lol' would find every quote that contained the word 'lol'.
n272= /echo @clones %c.misc.c >> >> /search.c C [channel] ¦ Searches the database for all users who have been in [channel]. E.g. '/search.c C #mirc' would find every user that had ever been in #mirc whilst you were. You may use asterisks (*) to make wildtext searches; i.e. #mir* would get the same result.
n273= /echo @clones %c.misc.c >> >> /info.c [username] ¦ Brings up all known information on [username], including a random quote, known channels, and known aliases, aswell as their hostmask.
n274= /echo @clones %c.misc.c >> Database handling
n275= /echo @clones %c.misc.c >> >> /save.c ¦ Saves the database. Unless you have changed this in the options section, /save.c will be performed automatically every 5 minutes.
n276= /echo @clones %c.misc.c >> >> /backup.c ¦ Backs up the database, meaning if the primary save corrupts, you can use /restore.c to load the backup. The database is automatically backed up every time you quit mIRC.
n277= /echo @clones %c.misc.c >> >> /restore.c ¦ Restores the backup. This will overwrite the primary save, so be careful!
n278= /echo @clones %c.misc.c >> >> /export.c ¦ Exports the database into $scriptdir $+ . There will be 5 files, all prefixed 'export_db_', afterwards.
n279= /echo @clones %c.misc.c >> >> /import.c ¦ Imports an exported database from $scriptdir $+ . There MUST be all five relevant files, or you risk half-exporting a database. Running /backup.c before you import is crucial.
n280= /echo @clones %c.misc.c >> Misc.
n281= /echo @clones %c.misc.c >> >> /quote.c [username] [quote#] ¦ Delivers a random quote by [username], or quote number [quote#] if you specify a number.
n282= /echo @clones %c.misc.c >> >> /options.c ¦ Opens up the options dialog.
n283= /echo @clones %c.misc.c >> >> /stats.c ¦ See database stats.
n284= /echo @clones %c.misc.c >> >> /start.c ¦ Start ClonesScript.
n285= /echo @clones %c.misc.c >> >> /stop.c ¦ Stop ClonesScript.
n286= /echo @clones %c.misc.c >> >> /req.c ¦ REQ = Remove Empty Quotes; a debug command to remove empty quotes. Database is automatically backed up before this command is run.
n287= /echo @clones %c.misc.c ---------------------------------------------------------------------------
n288=
n289=}
n290=/save.c {
n291= if (%ready.c != $true) {
n292= /echo @clones %c.debug.c >>>Script has been turned off...
n293= /echo @clones %c.debug.c >>>Save not allowed whilst %ready.c == $false
n294= /echo @clones %c.debug.c >>>To manually override this protection, set %ready.c to $true in the script editor, under the variables tab.
n295= /halt
n296= }
n297= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Saving database
n298= /hsave ial.c dbial
n299= /hsave cha.c dbcha
n300= /hsave cou.c dbcou
n301= /hsave quo.c dbquo
n302= /hsave dat.c dbdat
n303= /set %last_save.c $date $time
n304= if ($1 != AUTO) /echo @clones %c.script_success.c >>>Database saved succesfully
n305= if ($1 == AUTO) /echo @clones %c.script_success.c >>>Database auto-saved succesfully
n306= return
n307= :error
n308= /set %ready.c $false
n309= /.timerASC off
n310= /echo @clones %c.script_error.c >>>Error encountered! $error
n311= /echo @clones %c.script_error.c >>>Database save error: Restarting script may overwrite recent updates... /save.c to retry save.
n312= /echo @clones %c.script_error.c >>>Database save error: Or backup current database by using /backup.c to save the backups then /restore.c to use them.
n313= /echo @clones %c.script_error.c >>>ClonesScript has been turned off. /start.c to restart.
n314= /halt
n315=}
n316=/backup.c {
n317= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Writing backups
n318= /hsave ial.c dbialb
n319= /hsave cha.c dbchab
n320= /hsave cou.c dbcoub
n321= /hsave quo.c dbquob
n322= /hsave dat.c dbdatb
n323= /set %last_backup.c $date $time
n324= /echo @clones %c.script_success.c >>>Database backed up succesfully
n325= return
n326= :error
n327= /echo @clones %c.script_error.c >>>Error encountered! $error
n328= /echo @clones %c.script_error.c >>>Database backup error: Run /backup.c to retry
n329= /echo @clones %c.script_error.c >>>ClonesScript will continue to run.
n330= /halt
n331=}
n332=/restore.c {
n333= if ($1 != C) {
n334= /echo @clones %c.warning.c WARNING: Restoring the backups will revert the database to the last time it was backed up ( $+ %last_backup.c $+ )... Are you sure you wish to do this? $+ %c.button.c RESTORE
n335= return
n336= }
n337= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Loading database backup
n338= /hfree -w *.c
n339= /hmake ial.c
n340= /hload ial.c dbialb
n341= /hmake cha.c
n342= /hload cha.c dbchab
n343= /hmake cou.c
n344= /hload cou.c dbcoub
n345= /hmake quo.c
n346= /hload quo.c dbquob
n347= /hmake dat.c
n348= /hload dat.c dbdatb
n349= /echo @clones %c.script_success.c >>>Database loaded from backup succesfully
n350= return
n351= :error
n352= /set %ready.c $false
n353= /.timerASC off
n354= /echo @clones %c.script_error.c >>>Error encountered! $error
n355= /echo @clones %c.script_error.c >>>Database load error: Run /restore.c to retry...
n356= /echo @clones %c.script_error.c >>>ClonesScript has been turned off. /start.c to restart.
n357= /halt
n358=}
n359=/import.c {
n360= if ($1 != C) {
n361= /echo @clones %c.warning.c WARNING: Importing files from $scriptdir will overwrite all current database entries. It is advised that you run /backup.c first, in case of a corrupt or missing import file... Are you sure you want to do this? $+ %c.button.c IMPORT
n362= return
n363= }
n364= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing database From $scriptdir
n365= /hfree -w *.c
n366= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing hostmask and alias entries (export_db_ial)
n367= /hmake ial.c
n368= /hload ial.c export_db_ial
n369= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing channel lists (export_db_cha)
n370= /hmake cha.c
n371= /hload cha.c export_db_cha
n372= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing stat counters (export_db_cou)
n373= /hmake cou.c
n374= /hload cou.c export_db_cou
n375= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing user quotes (export_db_quo)
n376= /hmake quo.c
n377= /hload quo.c export_db_quo
n378= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Importing last seen date/times (export_db_dat)
n379= /hmake dat.c
n380= /hload dat.c export_db_dat
n381= /.timerASC off
n382= /echo @clones %c.script_success.c >>>Database imported succesfully
n383= /echo @clones %c.script_success.c >>>/save.c will save the new database to the script... But please check there are no corrupt entries first.
n384= /echo @clones %c.script_info.c >>>Auto-saving has been turned off.
n385= return
n386= :error
n387= /set %ready.c $false
n388= /.timerASC off
n389= /echo @clones %c.script_error.c >>>Error encountered! $error
n390= /echo @clones %c.script_error.c >>>Database import error: Running /restore.c highly recommended!
n391= /echo @clones %c.script_error.c >>>ClonesScript has been turned off. /start.c to restart.
n392= /halt
n393=}
n394=/export.c {
n395= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting database to $scriptdir
n396= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting hostmask and alias entries (export_db_ial)
n397= /hsave ial.c export_db_ial
n398= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting channel lists (export_db_cha)
n399= /hsave cha.c export_db_cha
n400= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting stat counters (export_db_cou)
n401= /hsave cou.c export_db_cou
n402= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting user quotes (export_db_quo)
n403= /hsave quo.c export_db_quo
n404= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Exporting last seen date/times (export_db_dat)
n405= /hsave dat.c export_db_dat
n406= /echo @clones %c.script_success.c >>>Database exported to $scriptdir succesfully
n407= return
n408= :error
n409= /echo @clones %c.script_error.c >>>Error encountered! $error
n410= /echo @clones %c.script_error.c >>>Database export error: Check that ClonesScript has been started...
n411= /halt
n412=}
n413=/event.c {
n414= if (%ready.c != $true) /halt
n415= if (%verbose.c == $true) /echo @clones %c.event.c Updating entry for $1 ( $+ $3- $+ ): %c.event2.c $+ $mask($ial($1),2)
n416= if ($mask($ial($1),2) == $null) {
n417= /echo @clones %c.script_info.c >>>No hostmask found for $1 $+ .
n418= /echo @clones %c.script_info.c >>>Database update for $1 cancelled.
n419= /echo @clones %c.script_info.c >>>Script will continue to run.
n420= return
n421= }
n422= if ($hget(ial.c,$1) != $mask($ial($1),2)) {
n423= /set %i.c 1
n424= /unset %temp.c
n425= while (%i.c <= $hfind(ial.c,$hget(ial.c,$1),0).data) {
n426= /set %temp.c %temp.c $hfind(ial.c,$hget(ial.c,$1),%i.c).data
n427= /inc %i.c
n428= }
n429= /set %j.c 1
n430= while ($gettok(%temp.c,%j.c,32) != $null) {
n431= /hadd -m ial.c $gettok(%temp.c,%j.c,32) $mask($ial($1),2)
n432= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Updated hostmask entry for $gettok(%temp.c,%j.c,32) %c.button.c $+ INFO
n433= /inc %j.c
n434= }
n435= /hadd -m ial.c $1 $mask($ial($1),2)
n436= }
n437= /hadd -m dat.c $1 $date $time
n438= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Updated last seen date/time entry for $1 %c.button.c $+ INFO
n439= if ($3 == nick) /goto event.c.nickchange
n440= if ($2 == Empty) return
n441= if ($regex($hget(cha.c,$1),$2) < 1) /hadd -m cha.c $1 $hget(cha.c,$1) $2
n442= if ($3 == text) {
n443= if ($len(%quote.c) >= %mql.c) {
n444= if (($hget(quo.c,$1) == $null) || ($len($hget(quo.c,$1)) > 600)) {
n445= if (($gettok($hget(quo.c,$1),1,32) != 0) && ($hget(quo.c,$1) != $null)) {
n446= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Quotes file for $1 is locked, but quote file is full. No more quotes will be added for $1 $+ .
n447= /goto event.c.skip_quote
n448= }
n449= /hadd -m quo.c $1 0 1 %quote.c
n450= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added quote for $1 ( $+ $len(%quote.c) characters) %c.button.c $+ INFO
n451= }
n452= else {
n453= /set %i.c 1
n454= while (%i.c <= $hfind(quo.c,* $+ %quote.c $+ *,0,w).data) {
n455= if ($hfind(quo.c,* $+ %quote.c $+ *,%i.c,w).data == $1) /goto event.c.skip_quote
n456= /inc %i.c
n457= }
n458= /hadd -m quo.c $1 $gettok($hget(quo.c,$1),1,32) $calc($gettok($hget(quo.c,$1),2,32) + 1) $gettok($hget(quo.c,$1),3-,32) %quote.c
n459= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added quote for $1 ( $+ $len(%quote.c) characters) %c.button.c $+ INFO
n460= }
n461= }
n462= }
n463= if ($3 == joined) {
n464= if ($1 == $me) {
n465= /set %i.c 1
n466= while (%i.c <= $nick($2,0)) {
n467= if ($regex($hget(cha.c,$nick($2,%i.c)),$2) < 1) {
n468= /hadd -m cha.c $nick($2,%i.c) $hget(cha.c,$nick($2,%i.c)) $2
n469= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Added channel $2 for $nick($2,%i.c)
n470= }
n471= /inc %i.c
n472= }
n473= }
n474= }
n475= :event.c.skip_quote
n476= return
n477= :event.c.nickchange
n478= /hadd -m dat.c $2 $date $time
n479= if (%verbose.c == $true) /echo @clones %c.script_info.c >>>Updated entry for $2
n480= return
n481= :error
n482= if ($gettok($error,3-5,32) == line too long) {
n483= /echo @clones %c.warning.c >>>Quote addition too long for $1 $+ , minor error encountered. Script will continue to run.
n484= return
n485= }
n486= /set %ready.c $false
n487= /.timerASC off
n488= /echo @clones %c.script_error.c >>>Error encountered! $error
n489= /echo @clones %c.script_error.c >>>Possible corrupt database... If you see this message again, run /restore.c
n490= /echo @clones %c.script_error.c >>>ClonesScript has been turned off. /start.c to restart.
n491= /halt
n492=}
n493=/search.c {
n494= if ($1 == $null) {
n495= /echo @clones %c.user_error.c You need to specify a search parameter; such as '/search.c $me $+ ' if you wanted to search yourself, for example.
n496= return
n497= }
n498= elseif ((($1 == *) || ($2 == *) || ($1 == *.*) || ($2 == *.*)) && ($3 != C)) {
n499= if (($1 == H) || ($1 == *.*)) { /echo @clones %c.warning.c WARNING: A search of * or *.* will retrieve every hostmask in the database; are you sure you wish to do this? $+ %c.button.c CONFIRM }
n500= elseif ($1 == Q) { /echo @clones %c.warning.c WARNING: A search of * or *.* will retrieve every quote in the database; are you sure you wish to do this? $+ %c.button.c CONFIRM }
n501= else { /echo @clones %c.warning.c WARNING: A search of * or *.* will retrieve every username in the database; are you sure you wish to do this? $+ %c.button.c CONFIRM }
n502= return
n503= }
n504= if (($1 == H) && ($2 != $null)) {
n505= if ($regex($2,\*) < 1) {
n506= /.timer -m 1 1 /search.c H * $+ $2 $+ *
n507= return
n508= }
n509= /echo @clones %c.misc.c --------------------------------------------------------------------
n510= /echo @clones %c.script_info.c >>>Searching the database for all hostmask matches of wildcard ' $+ $2 $+ ':
n511= /set %temp.c $2
n512= while ($regex(%temp.c,\*) > 0) {
n513= /noop $regsub(%temp.c,\*,,%temp.c)
n514= }
n515= if (($hfind(ial.c,$2,0,w).data > %srpl.c) && ($4 != O) && (%srpl.c != 0)) {
n516= /echo @clones %c.warning.c Hostmask search protection [ $+ $2 $+ ]: There are over %srpl.c results ( $+ $hfind(ial.c,$2,0,w).data in total). Override protection anyway? %c.button.c $+ OVERRIDE
n517= return
n518= }
n519= /set %i.c 1
n520= while (%i.c <= $hfind(ial.c,$2,0,w).data) {
n521= /set %temp2.c $hget(ial.c,$hfind(ial.c,$2,%i.c,w).data)
n522= /noop $regsub(%temp2.c,/ $+ %temp.c $+ /i,%c.sr.c $+ %temp.c $+ %c.sr2.c,%temp2.c)
n523= /echo @clones %c.sr.c > $hfind(ial.c,$2,%i.c,w).data %c.sr2.c $+ $chr(91) $+ %temp2.c $+ $chr(93) %c.button.c $+ INFO
n524= /inc %i.c
n525= }
n526= /echo @clones %c.misc.c $hfind(ial.c,$2,0,w).data match[es] returned.
n527= /echo @clones %c.misc.c --------------------------------------------------------------------
n528= }
n529= elseif (($1 == C) && ($2 != $null)) {
n530= if ($regex($2,$chr(35)) < 1) {
n531= /.timer -m 1 1 /search.c C $chr(35) $+ $2
n532= return
n533= }
n534= /echo @clones %c.misc.c --------------------------------------------------------------------
n535= if ($regex($2,\*) < 1) /echo @clones %c.script_info.c >>>Searching the database for all users who have been in channel $2 $+ :
n536= if ($regex($2,\*) > 0) /echo @clones %c.script_info.c >>>Searching the database for all users whose channel list has a match of wildcard $2 $+ :
n537= if (($hfind(cha.c,$2,0,w).data > %srpl.c) && ($4 != O) && (%srpl.c != 0)) {
n538= /echo @clones %c.warning.c Channel search protection [ $+ $2 $+ ]: There are over %srpl.c results ( $+ $hfind(cha.c,$2,0,w).data in total). Override protection anyway? %c.button.c $+ OVERRIDE
n539= return
n540= }
n541= /set %i.c 1
n542= while (%i.c <= $hfind(cha.c,$2,0,w).data) {
n543= /echo @clones %c.sr.c > $hfind(cha.c,$2,%i.c,w).data %c.button.c $+ INFO
n544= /inc %i.c
n545= }
n546= /echo @clones %c.misc.c $hfind(cha.c,$2,0,w).data match[es] returned.
n547= /echo @clones %c.misc.c --------------------------------------------------------------------
n548= }
n549= elseif (($1 == Q) && ($2 != $null)) {
n550= if ($regex($2,\*) < 1) {
n551= /.timer -m 1 1 /search.c Q * $+ $2 $+ *
n552= return
n553= }
n554= /echo @clones %c.misc.c --------------------------------------------------------------------
n555= /echo @clones %c.script_info.c >>>Searching the database for all quote matches of wildcard ' $+ $2 $+ ':
n556= /set %temp.c $2
n557= while ($regex(%temp.c,\*) > 0) {
n558= /noop $regsub(%temp.c,\*,,%temp.c)
n559= }
n560= /set %k.c 0
n561= /set %i.c 1
n562= while (%i.c <= $hfind(quo.c,$2,0,w).data) {
n563= /set %temp3.c $hget(quo.c,$hfind(quo.c,$2,%i.c,w).data)
n564= /set %j.c 1
n565= while (%j.c <= $gettok(%temp3.c,2,32)) {
n566= if ($regex($gettok(%temp3.c,$calc(%j.c + 1),127),%temp.c) > 0) {
n567= /set %temp2.c $gettok(%temp3.c,$calc(%j.c + 1),127)
n568= /noop $regsub(%temp2.c,/ $+ %temp.c $+ /i,%c.sr2.c $+ %temp.c $+ %c.sr.c,%temp2.c)
n569= /echo @clones %c.sr.c > " $+ %temp2.c $+ " %c.sr2.c $+ $chr(91) $+ $hfind(quo.c,$2,%i.c,w).data $+ $chr(93) %c.button.c $+ INFO
n570= /inc %k.c
n571= if ((%k.c > %srpl.c) && ($4 != O) && (%srpl.c != 0)) {
n572= /echo @clones %c.warning.c Quote search protection [ $+ $2 $+ ]: There are over %srpl.c results (unknown total). Override protection anyway? %c.button.c $+ OVERRIDE
n573= return
n574= }
n575= }
n576= /inc %j.c
n577= }
n578= /inc %i.c
n579= }
n580= /echo @clones %c.misc.c %k.c match[es] returned.
n581= /echo @clones %c.misc.c --------------------------------------------------------------------
n582= }
n583= elseif (($regex($1,\.) > 0) && ($regex($1,\*) > 0)) {
n584= /echo @clones %c.misc.c --------------------------------------------------------------------
n585= /echo @clones %c.script_info.c >>>Searching the database for all hostmask matches of wildcard ' $+ $1 $+ ':
n586= /set %temp.c $1
n587= while ($regex(%temp.c,\*) > 0) {
n588= /noop $regsub(%temp.c,\*,,%temp.c)
n589= }
n590= if (($hfind(ial.c,$1,0,w).data > %srpl.c) && ($4 != O) && (%srpl.c != 0)) {
n591= /echo @clones %c.warning.c Hostmask search protection [ $+ $1 $+ ]: There are over %srpl.c results ( $+ $hfind(ial.c,$1,0,w).data in total). Override protection anyway? %c.button.c $+ OVERRIDE
n592= return
n593= }
n594= /set %i.c 1
n595= while (%i.c <= $hfind(ial.c,$1,0,w).data) {
n596= /set %temp2.c $hget(ial.c,$hfind(ial.c,$1,%i.c,w).data)
n597= /noop $regsub(%temp2.c,/ $+ %temp.c $+ /i,%c.sr.c $+ %temp.c $+ %c.sr2.c,%temp2.c)
n598= /echo @clones %c.sr.c > $hfind(ial.c,$1,%i.c,w).data %c.sr2.c $+ ( $+ %temp2.c $+ ) %c.button.c $+ INFO
n599= /inc %i.c
n600= }
n601= /echo @clones %c.misc.c $hfind(ial.c,$1,0,w).data match[es] returned.
n602= /echo @clones %c.misc.c --------------------------------------------------------------------
n603= }
n604= elseif ($regex($1,\*) > 0) {
n605= /echo @clones %c.misc.c --------------------------------------------------------------------
n606= /echo @clones %c.script_info.c >>>Searching the database for all nick matches of wildcard ' $+ $1 $+ ':
n607= /set %temp.c $1
n608= while ($regex(%temp.c,\*) > 0) {
n609= /noop $regsub(%temp.c,\*,,%temp.c)
n610= }
n611= if (($hfind(ial.c,$1,0,w) > %srpl.c) && ($4 != O) && (%srpl.c != 0)) {
n612= /echo @clones %c.warning.c Username search protection [ $+ $1 $+ ]: There are over %srpl.c results ( $+ $hfind(ial.c,$1,0,w) in total). Override protection anyway? %c.button.c $+ OVERRIDE
n613= return
n614= }
n615= /set %i.c 1
n616= while (%i.c <= $hfind(ial.c,$1,0,w)) {
n617= /noop $regsub($hfind(ial.c,$1,%i.c,w),/ $+ %temp.c $+ /i,%c.sr2.c $+ %temp.c $+ %c.sr.c,%temp2.c)
n618= /echo @clones %c.sr.c > %temp2.c %c.button.c $+ INFO
n619= /inc %i.c
n620= }
n621= /echo @clones %c.misc.c $hfind(ial.c,$1,0,w) match[es] returned.
n622= /echo @clones %c.misc.c --------------------------------------------------------------------
n623= }
n624= else {
n625= /.timer -m 1 1 /search.c * $+ $1 $+ *
n626= return
n627= }
n628=}
n629=/info.c {
n630= if ($1 == $null) {
n631= /echo @clones %c.user_error.c You need to specify a usernick; such as '/info.c $me $+ ' if you wanted to see the info on yourself, for example.
n632= return
n633= }
n634= /echo @clones %c.misc.c --------------------------------------------------------------------
n635= /echo @clones %c.script_info.c >>>Retrieving all info on username ' $+ $1 $+ ': %c.button.c $+ ADD-ALIAS %c.button.c $+ ADD-CHANNEL %c.button.c $+ ADD-QUOTE
n636= if ($hget(ial.c,$1) != $null) /echo @clones %c.sr.c Username: %c.sr2.c $+ $1 %c.sr.c $+ Hostmask: %c.sr2.c $+ $hget(ial.c,$1)
n637= if ($hget(ial.c,$1) == $null) /echo @clones %c.sr.c Username: %c.sr2.c $+ $1 %c.sr.c $+ Hostmask: %c.sr2.c $+ No hostmask known
n638= if (($hget(quo.c,$1) == $null) && ($hget(cha.c,$1) == $null) && ($hget(ial.c,$1) == $null)) {
n639= /echo @clones %c.sr2.c $1 has never been seen before!
n640= /goto info.c.skip_all
n641= }
n642= /echo @clones %c.sr.c All known aliases of %c.sr2.c $+ $1 $+ %c.sr.c $+ :
n643= /set %i.c 1
n644= while (%i.c <= $hfind(ial.c,$hget(ial.c,$1),0).data) {
n645= /echo @clones %c.sr2.c > $hfind(ial.c,$hget(ial.c,$1),%i.c).data
n646= /inc %i.c
n647= }
n648= if (%i.c == 1) /echo @clones %c.sr2.c > $1
n649= /echo @clones %c.sr.c All channels that %c.sr2.c $+ $1 $+ %c.sr.c has been seen in:
n650= /set %i.c 1
n651= while ($gettok($hget(cha.c,$1),%i.c,32) != $null) {
n652= /echo @clones %c.sr2.c > $gettok($hget(cha.c,$1),%i.c,32)
n653= /inc %i.c
n654= }
n655= /echo @clones %c.sr.c %c.sr2.c $+ $1 $+ %c.sr.c was last seen on:
n656= if ($hget(dat.c,$1) != $null) /echo @clones %c.sr2.c $gettok($hget(dat.c,$1),1,32) %c.sr.c $+ at %c.sr2.c $+ $gettok($hget(dat.c,$1),2,32)
n657= if ($hget(dat.c,$1) == $null) /echo @clones %c.sr2.c Never!
n658= /set %temp.c $len($hget(quo.c,$1))
n659= /set %temp.c $calc(%temp.c / 600)
n660= /set %temp.c $calc(%temp.c * 100)
n661= /set %temp.c $int(%temp.c)
n662= if (%temp.c > 100) /set %temp.c 100
n663= /echo @clones %c.sr.c Quote: ( $+ %temp.c $+ % full)
n664= if ($hget(quo.c,$1) == $null) {
n665= /echo @clones %c.sr2.c No quotes for $1 found!
n666= }
n667= elseif ($gettok($hget(quo.c,$1),1,32) != 0) {
n668= /set %temp.c $calc($gettok($hget(quo.c,$1),1,32) + 1)
n669= /echo @clones %c.sr.c Locked $+ %c.sr2.c $1 %c.sr.c $+ quote $gettok($hget(quo.c,$1),1,32) $+ / $+ $gettok($hget(quo.c,$1),2,32) $+ : " $+ %c.sr2.c $gettok($hget(quo.c,$1),%temp.c,127) $+ %c.sr.c $+ " %c.button.c $+ UNLOCK
n670= }
n671= else {
n672= /set %temp.c $rand(1,$gettok($hget(quo.c,$1),2,32))
n673= /set %temp2.c $calc(%temp.c + 1)
n674= /echo @clones %c.sr.c Random $+ %c.sr2.c $1 %c.sr.c $+ quote %temp.c $+ / $+ $gettok($hget(quo.c,$1),2,32) $+ : " $+ %c.sr2.c $gettok($hget(quo.c,$1),%temp2.c,127) $+ %c.sr.c $+ " %c.button.c $+ LOCK
n675= }
n676= :info.c.skip_all
n677= /echo @clones %c.misc.c --------------------------------------------------------------------
n678=}
n679=/quote.c {
n680= if ($1 == $null) {
n681= /echo @clones %c.user_error.c You need to specify a usernick; such as '/quote.c Motig' if you wanted to see a quote by Motig, for example.
n682= return
n683= }
n684= /echo @clones %c.misc.c --------------------------------------------------------------------
n685= if ($2 != $null) { /echo @clones %c.script_info.c >>>Retrieving quote number $2 by ' $+ $1 $+ ': }
n686= else { /echo @clones %c.script_info.c >>>Retrieving a random quote by ' $+ $1 $+ ': }
n687= /set %temp.c $len($hget(quo.c,$1))
n688= /set %temp.c $calc(%temp.c / 600)
n689= /set %temp.c $calc(%temp.c * 100)
n690= /set %temp.c $int(%temp.c)
n691= if (%temp.c > 100) /set %temp.c 100
n692= /echo @clones %c.sr.c Quote: ( $+ %temp.c $+ % full)
n693= if ($hget(quo.c,$1) == $null) {
n694= /echo @clones %c.sr2.c No quotes for $1 found!
n695= return
n696= }
n697= /set %temp3.c $true
n698= if ($gettok($hget(quo.c,$1),1,32) != 0) {
n699= /set %temp.c $calc($gettok($hget(quo.c,$1),1,32) + 1)
n700= /echo @clones %c.sr.c Locked $+ %c.sr2.c $1 %c.sr.c $+ quote $gettok($hget(quo.c,$1),1,32) $+ / $+ $gettok($hget(quo.c,$1),2,32) $+ : " $+ %c.sr2.c $gettok($hget(quo.c,$1),%temp.c,127) $+ %c.sr.c $+ " %c.button.c $+ UNLOCK
n701= /set %temp3.c $false
n702= }
n703= /set %temp.c $rand(1,$gettok($hget(quo.c,$1),2,32))
n704= if ($2 != $null) /set %temp.c $2
n705= /set %temp2.c $calc(%temp.c + 1)
n706= if (%temp3.c == $true) /echo @clones %c.sr.c Random $+ %c.sr2.c $1 %c.sr.c $+ quote %temp.c $+ / $+ $gettok($hget(quo.c,$1),2,32) $+ : " $+ %c.sr2.c $gettok($hget(quo.c,$1),%temp2.c,127) $+ %c.sr.c $+ " %c.button.c $+ LOCK
n707= if (%temp3.c == $false) /echo @clones %c.sr.c Random $+ %c.sr2.c $1 %c.sr.c $+ quote %temp.c $+ / $+ $gettok($hget(quo.c,$1),2,32) $+ : " $+ %c.sr2.c $gettok($hget(quo.c,$1),%temp2.c,127) $+ %c.sr.c $+ "
n708= /echo @clones %c.misc.c --------------------------------------------------------------------
n709=}
n710=/req.c {
n711= /backup.c
n712= /window -a @clones-req
n713= /set %k.c 0
n714= /set %i.c 1
n715= while (%i.c <= $hget(quo.c,0).item) {
n716= /echo @clones-req $round($calc((%i.c / $hget(quo.c,0).item) * 100),2) $+ $chr(37) complete (CTRL + PAUSE to cancel). User: $hget(quo.c,%i.c).item
n717= /set %j.c 1
n718= while (%j.c <= $gettok($hget(quo.c,%i.c).data,0,127)) {
n719= /echo @clones-req $round($calc((%i.c / $hget(quo.c,0).item) * 100),2) $+ $chr(37) complete (CTRL + PAUSE to cancel). Scanning quote: " $+ $gettok($hget(quo.c,%i.c).data,%j.c,127) $+ "...
n720= if ($gettok($hget(quo.c,%i.c).data,%j.c,127) == $chr(32)) /inc %k.c
n721= if ($gettok($hget(quo.c,%i.c).data,%j.c,127) == $chr(32)) /hadd -m quo.c $hget(quo.c,%i.c).item $gettok($hget(quo.c,%i.c).data,1- $+ $calc(%j.c - 1),127) $chr(127) $gettok($hget(quo.c,%i.c).data,$calc(%j.c + 1) $+ -,127)
n722= /inc %j.c
n723= }
n724= /inc %i.c
n725= }
n726= /echo @clones-req Success! %k.c empty quotes found and removed. You may now close this window. :)
n727=}