summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-10-04 12:32:13 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-10-04 12:32:13 -0400
commitf072147e4e538b6851e3056fe9ff84952424c828 (patch)
tree0a35402e891208adc504d129102fc4527afb1b1e /actions
parentc8fd8fa00f30cb2862a6feb32bc1b7d3a394c565 (diff)
add channels and use command interpreter in different channels
darcs-hash:20081004163213-5ed1f-684ecb464e843b1bbe456c348e56b40a39a83ecd.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/newnotice.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index cc40f89bc..e8fa832a6 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -50,6 +50,15 @@ class NewnoticeAction extends Action {
return;
}
+ $inter = new CommandInterpreter();
+
+ $cmd = $inter->handle_command($user, $text);
+
+ if ($cmd) {
+ $cmd->execute(new WebChannel());
+ return;
+ }
+
$notice = Notice::saveNew($user->id, $content, 'web');
if (is_string($notice)) {