Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBao Vuong <bvuong@Jarvis.(none)>2010-06-09 17:11:05 (GMT)
committer Bao Vuong <bvuong@Jarvis.(none)>2010-06-09 17:11:05 (GMT)
commitaa0c1e3679d270f508f914ec6ae147ff6a129025 (patch)
treefe6e0c6b3fe104b730567bf1e074fe676dd605c6
parent9fec8606623f4bcaad2ff355621d83e11c7a172b (diff)
added write_file and read_file
-rw-r--r--ircactivity.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/ircactivity.py b/ircactivity.py
index cd1cb40..e321082 100644
--- a/ircactivity.py
+++ b/ircactivity.py
@@ -55,3 +55,16 @@ class IRCActivity(activity.Activity):
def __visibility_notify_event_cb(self, window, event):
self.is_visible = event.state != gtk.gdk.VISIBILITY_FULLY_OBSCURED
+ def read_file(self, file_path):
+ try:
+ self.client.run_command('/nick %s' % self.metadata['nickname'])
+ except:
+ print "error when reading"
+
+ def write_file(self, file_path):
+ try:
+ self.metadata['nickname'] = self.client.core.window.network.me
+ self.metadata['channels'] = self.client.core.channels
+ self.metadata['server'] = self.client.core.window.network.server
+ except:
+ print "error when writing"