Author Topic: Icequote  (Read 21272 times)

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #15 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
« Last Edit: October 30, 2010, 12:36:54 PM by ayashi »

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Icequote
« Reply #16 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.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #17 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 ;)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Icequote
« Reply #18 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.
The IceChat God

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #19 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:

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Icequote
« Reply #20 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.
The IceChat God

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #21 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

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Icequote
« Reply #22 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 )
« Last Edit: November 06, 2010, 07:08:52 PM by DarkStar »
This message brought to you by the Wonderful Wizard of Oz.

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Icequote
« Reply #23 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.
This message brought to you by the Wonderful Wizard of Oz.

DarkStar

  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Icequote
« Reply #24 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

This thread will stick around for those still using the older script, but anything regarding the new script please post there.
This message brought to you by the Wonderful Wizard of Oz.

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #25 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

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Icequote
« Reply #26 on: February 02, 2012, 07:39:55 AM »
Looks to me like it is a dead project.
The IceChat God

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #27 on: February 04, 2012, 08:26:15 PM »
 :-( R.I.P Icequote

We still love you snerf !

ayashi

  • Newbie
  • *
  • Posts: 17
Re: Icequote
« Reply #28 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... :(

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Icequote
« Reply #29 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.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein