diff options
Diffstat (limited to 'purk')
-rw-r--r-- | purk/core.py | 8 | ||||
-rw-r--r-- | purk/events.py | 7 | ||||
-rw-r--r-- | purk/irc.py | 3 |
3 files changed, 14 insertions, 4 deletions
diff --git a/purk/core.py b/purk/core.py index 57af19a..4c1216b 100644 --- a/purk/core.py +++ b/purk/core.py @@ -45,12 +45,13 @@ class Trigger(object): return self._mods class Core(object): - def __init__(self): + def __init__(self,client): self.window = None self.trigger = Trigger() self.events = self.trigger.events self.manager = widgets.UrkUITabs(self) self.channels = [] + self.client = client mods = self.trigger.get_modules() @@ -76,8 +77,9 @@ class Core(object): return class Client(object): - def __init__(self): - self.core = Core() + def __init__(self,activity): + self.activity = activity + self.core = Core(self) self.widget = self.core.manager self.widget.show_all() diff --git a/purk/events.py b/purk/events.py index 4142003..1eec7c3 100644 --- a/purk/events.py +++ b/purk/events.py @@ -194,11 +194,16 @@ def run(text, window, network): event_name = "Command" + c_data.name.capitalize() if event_name in all_events: + print "WOO" result = trigger(event_name, c_data) + print result if result: - c_data.window.write("* /%s: %s" % (c_data.name, result[0])) + print "woo more?" + #c_data.window.write("* /%s: %s" % (c_data.name, result[0])) + c_data.window.write("* /%s %s" % (c_data.name, result[0])) else: + print "NO WOO" trigger("Command", c_data) if not c_data.done: diff --git a/purk/irc.py b/purk/irc.py index edd8a4b..7006b1c 100644 --- a/purk/irc.py +++ b/purk/irc.py @@ -89,6 +89,9 @@ class Network(object): self.name = name or server self.nicks = nicks or default_nicks() + + if core.client.activity.metadata.has_key("nickname"): + self.nicks[0] = core.client.activity.metadata["nickname"] self.me = self.nicks[0] self.username = username or "urk" |