Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10 440 Posts in 5 815 Topics- by 1 216 Members - Latest Member: santini862

15 October 2019, 20:49
Select Language English | Russian ru | German
Main PageIRC Client KVIrc forumKVIrc discussionKVIrc scriptingSaving Hashes
Pages: [1]
Print
Author Topic: Saving Hashes  (Read 7700 times)
0 Members and 1 Guest are viewing this topic.
Ascarion
Новичок
*

Репутация: 0
Posts: 2


View Profile
« on: 13 October 2010, 20:56 »

Greetings,

I've been looking through the help files for an inbuilt solution to save hashes to a file or possibly database. Couldn't find anything.
Is there an easy way to do it or will I have to think of solution myself?
I have only recently switched from mIRC and there they have built in function.

Thank you in advance.
Logged
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« Reply #1 on: 14 October 2010, 02:48 »

http://www.kvirc.de/docu/class_sql.html
http://www.kvirc.de/docu/class_file.html
http://www.kvirc.de/docu/cmd_file.write.html
http://www.kvirc.de/docu/cmd_file.writelines.html

have fun Wink
Logged
Maximusya
Глобальный модератор
*****

Репутация: 49
Gender: Male
Posts: 343



View Profile
« Reply #2 on: 14 October 2010, 16:05 »

Also $serialize, $unserialize functions would come in handy:
Code:
%h = $hash(one, $array(uno, ein), two, $array(dos, zwei));
%json = $serialize(%h);
echo %json;
%h2 = $unserialize(%json);
echo $typeof(%h2);
echo $serialize(%h2);
Quote
{"two":["dos","zwei"],"one":["uno","ein"]}
hash
{"two":["dos","zwei"],"one":["uno","ein"]}
Logged
Ascarion
Новичок
*

Репутация: 0
Posts: 2


View Profile
« Reply #3 on: 14 October 2010, 19:28 »

Serializing to JSON is indeed ideal. I would've thought I had to write something like that myself, too.
Thank you both. :)
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic