Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/purk/scripts/irc_script.py
diff options
context:
space:
mode:
Diffstat (limited to 'purk/scripts/irc_script.py')
-rw-r--r--purk/scripts/irc_script.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/purk/scripts/irc_script.py b/purk/scripts/irc_script.py
index 0c91286..08a0b96 100644
--- a/purk/scripts/irc_script.py
+++ b/purk/scripts/irc_script.py
@@ -251,6 +251,15 @@ def onCommandQuery(e):
if message: #this is false if you do "/query nickname "
e.network.msg(e.args[0], ' '.join(e.args[1:]))
+
+def onCommandAction(e):
+ if isinstance(e.window, windows.ChannelWindow) or isinstance(e.window, windows.QueryWindow):
+ e.network.msg(e.window.id, '\x01ACTION ' + ' '.join(e.args) + '\x01')
+ else:
+ raise core.events.CommandError("There's no one here to speak to.")
+
+onCommandMe = onCommandAction
+
def setupJoin(e):
if e.source == e.network.me:
chan = e.network.norm_case(e.channel)
@@ -328,6 +337,7 @@ def onCommandJoin(e):
else:
raise core.events.CommandError("You must supply a channel.")
+
def onCommandPart(e):
if e.args:
if e.network.status >= irc.INITIALIZING: