IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: DarkStar on December 30, 2007, 09:05:58 PM

Title: Icequote
Post by: DarkStar on December 30, 2007, 09:05:58 PM
Hello again folks.

I've made a script for Icechat (Requires Icechat 7.61 or later) that is a remade version of my old Quote script for Icechat.

Download: Icequote 1-0.zip (http://2374383.googlepages.com/icequote1-0.zip)

Install instructions:
Quote
Open Icechat and type: //run $scriptdir
Unzip contents of zip file into this directory
In Icechat, open the Icechat editor. ( ctrl + s ) Click Scripts, click File, click Load. select "quote.ice" and open it. repeat steps for file "quote.ics"
Click save (or Save and exit)

Import Quotes
if you used my previous quote script, there is a way to import the quotes into the new script. Once you have loaded the script, type these lines:
Quote
/! ImportQuotes
/reload

Current Problems
When running the index file generator with more then 100-200 quotes, Icechat says it is taking longer then expected to execute. Just keep hitting "Continue" and allow it to run its course. I'm working on a small exe that will make this process much much faster, Probably be available in the next update. UPDATE! This problem has been fixed in the next release of the script.

Bugs
Besides the above mentioned problem, there are currently none known to me. If you find one please post here, send me a private message, or send me an email at 2374383@gmail.com including the following:
* Icechat version
* Operating System
* error reported
* How you found it

Other things that may be of use:
* settings file ( qsettings.ini )
* quote file ( quotes.txt )
* index file ( qindex.ini )
* addquote file ( addquote.txt )

All of these files should be in the scripting directory. ( in Icechat, type //run $scriptdir )

more to add
I plan to add more to this guide, such as how to use certain features, but at the moment I just want to release it. If you have a question I have not addresed please post a message here, send me a PM, send me an email ( 2374383@gmail.com ) or check to see if im online in the icechat support channel ( #icechat (http://irc://irc.quakenet.org/icechat), I go by "Dark`Star"
Title: Re: Icequote
Post by: Anime Sucks on December 31, 2007, 09:26:28 AM
working fine so far.  Took awhile to generate the keywords since I had 505 quotes
Title: Re: Icequote
Post by: Anime Sucks on December 31, 2007, 10:14:15 AM
Silly question.  How do you add quotes that are in the approval queue?
Title: Re: Icequote
Post by: DarkStar on December 31, 2007, 02:02:01 PM
Silly question.  How do you add quotes that are in the approval queue?

d'oh. I forgot to add a function to do that. you can do it manually until I add one.

go to the icechat scripts directory ( //run $scriptdir )
open addquote.txt, cut and paste the quotes you want to approve over to quotes.txt, run the keyword gen again.

working fine so far.  Took awhile to generate the keywords since I had 505 quotes

I wrote a small program to generate the keys, its just over 3mb (stand alone exe, script was originally 2kb..lol) and it does 400 quotes in 2 seconds flat. Will upload later.
Title: Re: Icequote
Post by: Omni_Bowser on February 13, 2008, 07:14:12 PM
Any chance anyone could teach me how to use this script?
Title: Re: Icequote
Post by: TheCellist42 on March 02, 2008, 09:21:46 PM
How Do You Add Quotes?

(Very Silly Question)


Title: Re: Icequote
Post by: BigRed on March 02, 2008, 10:19:26 PM

d'oh. I forgot to add a function to do that. you can do it manually until I add one.

go to the icechat scripts directory ( //run $scriptdir )
open addquote.txt, cut and paste the quotes you want to approve over to quotes.txt, run the keyword gen again.


Like that ^
Title: Re: Icequote
Post by: Anime Sucks on November 05, 2008, 04:44:33 PM
RISE NECROTHREAD!

Okay.... so now I got 2245 quotes in this monkey... and the indexer seems to be b0rked. Right now a lot of the quotes are off by one, and I've noticed over the last couple updates that a lot of keywords go up to a max of 52.

Plus it takes like 1.5 hours of clicking "continue" on the "script is taking too long" button.
Title: Re: Icequote
Post by: TheCellist42 on November 05, 2008, 08:40:27 PM
Would there be something I could simply remove that would allow anyone to add quotes... all the time? Instead of adding everyone to the AutoAdd list?

Title: Re: Icequote
Post by: Snerf on November 14, 2008, 09:47:05 AM
Ouch, sounds to me, that with that many quotes, the script may need a bit of an overhaul.
And who wants to sit for an hour and a half doing something like that.

I will see if I can come up with something to help that.
Title: Re: Icequote
Post by: Anime Sucks on November 23, 2008, 09:47:20 PM
okay, to expand on the
and I've noticed over the last couple updates that a lot of keywords go up to a max of 52.

a majority of my quotes cap out at 52 per keyword, and when someone tries to access #52 I get an error:
-- Script Engine Error:13:Type mismatch: 'numbers(...)': Line #237 --
-- Script Engine Error:13:Type mismatch: 'numbers(...)': Line #237 --

this is my quote.ice script: http://pastebin.com/f410c96d3

I figured I wouldn't need the .ics since it's that just the menu in the toolbar

if the actual index is needed, or the quote file is needed.. let me know, but I figure whatever is messed up is in the .ice
Title: Re: Icequote
Post by: Anime Sucks on November 23, 2008, 10:27:25 PM
okay, had a friend look over the index file to see if it was something in there ( http://pastebin.com/f208a47ce ) and he pointed out that some of the entries look like this:

Code: [Select]
jelly=1199,1199,1200,1200,1201,1272,1283,1285,1285,1286,1290,1311,1341,1342,1368,1469,1469,1514,1612,1628,1674,1683,1683,1762,1762,1762,1777,1869,1876,1879,1879,1901,1937,1965,1965,1965,1965,1969,2003,2003,2003,2004,2004,2005,2028,2032,2036,2036,2047,2047,2052,,2241 that for some reason when it indexes, its getting a null result at the 52 instance or wherever in the lineup that ,, is showing up.

I think the quote script has a heart attack under the sheer amount of quotes that are already in it.
Title: Re: Icequote
Post by: Morio on November 23, 2008, 11:52:30 PM
that ",," is caused by the limitations of .ini files, the value kan only be 255 characters long, longer than that will cause problems.
Title: Re: Icequote
Post by: ayashi on October 23, 2010, 05:13:15 PM
Bumping in the hopes Darkstar gets around to implementing !removequote and !quotecount capabilities ;)

(the script went viral on my network, but people tend to add garbage quotes that have to be deleted manually.

I also made an alias to 'refresh' the quote script so any accumulated quotes are attributed to the total; granted I probably did it all wrong but I suppose that's why this forum exists ;)

/refresh {
/! indexgen
/! getquotes
}

I sometimes /reload all scripts and will get an error, but rebooting the app solves that much.

Awesome script, can't stress that enough!

Icechat forever,

Ayashi
Title: Re: Icequote
Post by: Snerf on October 24, 2010, 07:14:49 PM
A good way to remove the INI file problem is to just save the index to a text file and make the settings manually. Little more work, but it should fix it.
Title: Re: Icequote
Post by: ayashi on October 30, 2010, 12:30:45 PM
I'm getting a cap of 100 for quotes.. I don't suppose a mixture quote prefixes ranging from <Nickname> to [Timestamp] could be causing it?  

Edit: Nevermind, fixed it when I removed any quotes starting with timestamp brackets.  Kicking the tire but it might have accidentally been the right fix :D

P.S - Has anyone found a way to refresh/index/whatever recently added quotes from another client? I'm getting complaints from people adding quotes and not being able to see them until I return and do the whole indexgen/getquote/reload
Title: Re: Icequote
Post by: Morio on November 03, 2010, 08:04:54 AM
Have you considered converting the script to use an sql database? I quite recently made a script that stores quotes in a MS access database, and someone with more knowledge about sql than me, could probably make quite a fancy script.
Title: Re: Icequote
Post by: ayashi on November 03, 2010, 09:55:32 AM
That's an excellent suggestion Morio, but I'll be the first to declare that the limits of my icechat coding abilities are editing other ones and crossing my fingers nothing combusts.  It's a tough situation, the client itself has a firm following (that is growing I should add) and a solid core of devs; but the core is a small and very very busy one.  I've been idling in #icechat on quakenet trying to resolve minor issues and learn the code better, but I'm not sure what I can possibly do for icequote besides offering creativity support.

Free clients always have the best fan-base/communities, but we lack the most coding know-how as a result most of the time ;)
Title: Re: Icequote
Post by: Snerf on November 03, 2010, 08:29:38 PM
Ok, in having a quick look at the script, here is a way to make it actually load in the new quotes when they get added.

The sub called "getquotes" loads in the quotes into a variable. The "IndexGen" is what creates the index.

So there is a way to add a quote directly, or add it to a quote queue.

One calls the "indirectquoteadd" sub, the other calls "directquoteadd" sub.  I guess this is to allow certain ppl to be able to add a quote into the database w/o approval, not entirely sure.

The indirectquoteadd adds the quote to a addquote.txt file, and the other imports it straight into the quotes.txt file. So after adding it automatically into the quotes.txt file using directquoteadd sub, we can make it re-import all the quotes into a variable, and even re-index it.

To do that, we call the "getquotes" subroutine from inside the "directquoteadd" subroutine.
This is how I see directaddquote currently:

Code: [Select]
sub directaddquote(quote)
if not len(quote)>0 then exit sub
dim objFSO, file
Set objFSO = CreateObject("Scripting.FileSystemObject")
if not FileExists(quotefile) then objFSO.CreateTextFile(quotefile)
Set File = objFSO.OpenTextFile(quotefile, 8, True)
File.WriteLine(quote)
File.Close
    SendCommand "/echo To use the search function you must type /! IndexGen"
    SendCommand "/echo After that process is finished, type /! GetQuotes"
    SendCommand "/echo You should then be able to use the function to its fullest extent."
end sub

This is how it would look after we all the getquotes subroutine call.

Code: [Select]
sub directaddquote(quote)
if not len(quote)>0 then exit sub
dim objFSO, file
Set objFSO = CreateObject("Scripting.FileSystemObject")
if not FileExists(quotefile) then objFSO.CreateTextFile(quotefile)
Set File = objFSO.OpenTextFile(quotefile, 8, True)
File.WriteLine(quote)
File.Close
    SendCommand "/echo To use the search function you must type /! IndexGen"
    SendCommand "/echo After that process is finished, type /! GetQuotes"
    SendCommand "/echo You should then be able to use the function to its fullest extent."

getquotes()

end sub

If you want to Re-index it as well, just add IndexGen() on the next line

Code: [Select]
getquotes()
IndexGen()

Like the script says above, to run these within IceChat itself as commands use /! getquotes and /! IndexGen.

Using the /! command runs subroutines manually inside these scripts.
Title: Re: Icequote
Post by: ayashi on November 03, 2010, 11:40:57 PM
Oh wow, very very cool Snerf--worked perfect! It's fast too, impressive twist of that sub  :lol:
Title: Re: Icequote
Post by: Snerf on November 04, 2010, 08:19:03 AM
Glad to hear it. Its a quick hack, but it works.
So the next step is to remove a quote somehow, and your set.
Title: Re: Icequote
Post by: ayashi on November 04, 2010, 10:36:58 PM
Too true, I've already begun hounding Dark for some advice on the sequence ;)

Fun stuff Snerf
Title: Re: Icequote
Post by: DarkStar on November 06, 2010, 07:06:00 PM
Well in light of this script recently becoming popular again, I'll see if I can throw some time at it.

Some thoughts I've been rolling around in my head are things like using an SQL database or not. I would like to find a more efficient method of storing the data, also due to the fact that storing a unique ID by line number isn't the best way to do things.

(Other benefits of having it in a SQL database is a website frontend, much like my http://bash.necrolounge.org )
Title: Re: Icequote
Post by: DarkStar on November 18, 2010, 12:07:55 AM
Status update for those patiently waiting.

I have begun working on a new version of the script which is SQL database driven. The queries are extremely simple and pretty much any version of SQL will work without modification. If you do need to modify it, it will be minimal.

Currently i have the script retrieving quotes based on id, exact search "*test test*" and am 99% done implementing wild search "*test* and *test*". It is also generating random numbers based on quotes returned. In addition to this it is also possible to add quotes (currently directly to db, no queue).

The system does implement a search cache as well to reduce database calls, and is quite fast.

I am currently developing it with SQLite. It uses ODBC for connectivity.

This major overhaul of the system removes the needs for "tags" and indexing, although there will be a tag system added for manually tagging of items for those who wish. When I release a beta it will include instructions on how to setup your database and install everything, as well as include a script to import the old quotes file directly into the database.

More will be posted later.
Title: Re: Icequote
Post by: DarkStar on November 18, 2010, 01:23:23 PM
I have started a new thread for Icequote version 2.

http://www.icechat.net/forums/index.php?topic=1498.0 (http://www.icechat.net/forums/index.php?topic=1498.0)

This thread will stick around for those still using the older script, but anything regarding the new script please post there.
Title: Re: Icequote
Post by: ayashi on February 01, 2012, 09:58:40 PM
Hey Snerf and Dark, I don't suppose icequote is entirely extinct and shelved? :(

Icequote 1 lacked the simple ability to remove quotes with a command but was otherwise perfect!

Icequote 2 and the SQL implementations caused a number of errors (and a bit of confusion on my limited knowledge) but beyond that there hasn't been any updates.

I know I hounded you guys for a couple years while making what manual fixes I could, but I thought I'd ask if there were any plans to work out those last few kinks in the first version of icequote.  Just wishful thinking from a loyal icechatter ;)

~Ayashi
Title: Re: Icequote
Post by: Snerf on February 02, 2012, 07:39:55 AM
Looks to me like it is a dead project.
Title: Re: Icequote
Post by: ayashi on February 04, 2012, 08:26:15 PM
 :-( R.I.P Icequote

We still love you snerf !
Title: Re: Icequote
Post by: ayashi on February 18, 2013, 06:03:48 PM
Attempting to necro in the hopes Morio or someone comes along with the know-how of a command to !delquote from the quotes database in icequote1.0

Darkstar vanished and 2.0 is a dead link... :(
Title: Re: Icequote
Post by: Morio on February 19, 2013, 02:23:10 AM
I have never had anything to do with the icequote script, and I won't be spending any time figuring out how it works.
Title: Re: Icequote
Post by: ayashi on September 12, 2016, 05:22:14 PM
Oh the memories.  I saw IceChat had a recent release, but the changes weren't exactly of a tremendous magnitude.  Can we take a moment of silence in thanks for the IceQuote script and all the joy it gave countless gaming communities?  It still lives on you know, never perfected but still one of the most memorable scripts this client ever had tailored to it's strengths.

In Snerf we trust!
Title: Re: Icequote
Post by: ayashi on December 12, 2016, 09:28:16 AM
I am necroing this and attempting to re-vamp and improve our dear old IceQuote project(s) now that I have gained a great deal more knowledge of the functionality and mechanisms I previously hadn't.  Not sure many will see this so I may start another thread once I have made progress.  If anyone is interested or had used the previous scripts and liked it, let me know so I have the peace of mind I'm doing this as more than just a project for the sake of seeing if I can do it.

Thank you Morio and Snerf, and all the others who helped in the past.  You guys made a bigger difference helping me with this script than you'll ever know on the Gamesurge and Quakenet networks.  15+ channels still utilize the original with thousands of quotes.  It's very satisfying to see IceChat used as a standard in this way. 

Miss you all!

ayashi
Title: Re: Icequote
Post by: Snerf on December 12, 2016, 12:05:51 PM
Yes, pretty cool.
I think the best thing to do, would be to make it a plugin, so it could be used for IceChat 9, but that's a whole different language.
But if you have updates to the script, you can pass it along, and the download could be updated, as the original author is long gone.