<div class="ace-line" id="magicdomid389"><span class="author-g-uz122zu93vl0ky6xc4z122z8">I'm a student from Arlington
and am spending full-time this week and next working on the IRC
Activity. I'm trying to implement this feature: </span><span class="author-g-uz122zu93vl0ky6xc4z122z8 url"><a href="http://bugs.sugarlabs.org/ticket/581">http://bugs.sugarlabs.org/ticket/581</a></span><span class="author-g-uz122zu93vl0ky6xc4z122z8"> - which is to have the IRC
Activity recover some information from the Journal when a saved instance
is resumed (namely, the server, nickname, channels, and scrollback
history - so you're back in the place you last left your conversation).</span></div><div class="ace-line" id="magicdomid126"><br></div><div class="ace-line" id="magicdomid390"><span class="author-g-uz122zu93vl0ky6xc4z122z8">I'm
stuck, and haven't been able to find what to do next from either
googling around the wiki or asking on IRC, or blogging about it (</span><span class="author-g-uz122zu93vl0ky6xc4z122z8 url"><a href="https://sites.google.com/a/lv5.org/bvworks/home/working-with-sugarlabs/journalimplementationtoxoirc%29">https://sites.google.com/a/lv5.org/bvworks/home/working-with-sugarlabs/journalimplementationtoxoirc)</a></span><span class="author-g-uz122zu93vl0ky6xc4z122z8">. Here's what I've done so
far (also summarized on the ticket) and the questions I think I need
answered - any help would be appreciated.</span></div><div class="ace-line" id="magicdomid125"><br></div><div class="ace-line" id="magicdomid58"><span class="author-g-uz122zu93vl0ky6xc4z122z8">To get
started, I looked up on how the journal interacts with a Sugar
Activity, which is through the write_file() and read_file() methods. The
write_file() method of the activity will save the data given from it
and will be used later from the journal using the read_file() method.
Nicknames are stored in Network.nicks in irc.py. Channels are stored in
Core.channels in core.py. The server is stored in Network.server in
irc.py. I haven't found out where all the messages go at the moment.</span></div><div class="ace-line" id="magicdomid59"><br></div><div class="ace-line" id="magicdomid391"><span class="author-g-uz122zu93vl0ky6xc4z122z8">When
making the write_file(), I was able to read in the current nickname,
server, and channels. When I try putting them back in when opening the
latest journal, I just get the default settings. Default nickname,
default server, and default channels. The server makes sense, because
<a href="http://irc.freenode.net">irc.freenode.net</a> was written in the code when opening up. The channels
and nicknames were also written in the code as well, but I thought
running add_channel() or run_command("/nick myname") would overwrite
those settings. For channels, when I ran the command "/join," it did not
actually add the channel into the the Core.channels list. </span><span class="author-g-xij5wi52g7ly3lu1">It only works if </span><span class="author-g-uz122zu93vl0ky6xc4z122z8"> I put the line
"add_channel(#example)</span><span class="author-g-xij5wi52g7ly3lu1">"
into the code.</span></div><div class="ace-line" id="magicdomid61"><br></div><div class="ace-line" id="magicdomid62"><span class="author-g-uz122zu93vl0ky6xc4z122z8">so now I have some questions
hoping to be answered:</span></div><div class="ace-line" id="magicdomid63"><br></div><div class="ace-line" id="magicdomid64"><span class="author-g-uz122zu93vl0ky6xc4z122z8"> * How can I overwrite the
settings wanted?</span></div><div class="ace-line" id="magicdomid65"><span class="author-g-uz122zu93vl0ky6xc4z122z8"> * Where can I find the
text for the history scrollback?</span></div><div class="ace-line" id="magicdomid66"><span class="author-g-uz122zu93vl0ky6xc4z122z8"> *
Do the commands /nick and /join actually store the information to their
respected lists</span></div><div class="ace-line" id="magicdomid393"><span class="author-g-uz122zu93vl0ky6xc4z122z8"> * What is the proper way
to write the write_file() and read_file() methods for a sugar activity.
I've seen two ways (using metadata and writing/reading into files), but
I'm not sure what works best for this type of situation.</span></div><div class="ace-line" id="magicdomid68"><br></div><div class="ace-line" id="magicdomid395"><span class="author-g-uz122zu93vl0ky6xc4z122z8">Any
help would be appreciated. I'm nhacbv in #sugar and am usually online
during the US workday. </span></div><div class="ace-line" id="magicdomid71"><br><br>--- Bao Vuong<br></div>