Permalink
Browse files

huh?

  • Loading branch information...
1 parent 93e1e31 commit 9e89ffc1401b4e95cfdaad4007d7925f50cf895d @hiredman committed Aug 15, 2009
Showing with 26 additions and 0 deletions.
  1. +15 −0 build.xml
  2. +11 −0 hiredman/clojurebot/edit.clj
View
@@ -0,0 +1,15 @@
+<project name="clojurebot" default="jar" xmlns:mvn="urn:maven-artifact-ant">
+ <description>
+ clojurebot
+ </description>
+ <property name="jar_name" location="clojurebot.jar"/>
+ <target name="jar" depends="">
+ <jar jarfile="${jar_name}">
+ <fileset dir=".">
+ <include name="*/*.clj"/>
+ <include name="*/*/*.clj"/>
+ <exclude name="hiredman/clojurebot.clj" />
+ </fileset>
+ </jar>
+ </target>
+</project>
@@ -0,0 +1,11 @@
+(ns hiredman.clojurebot.edit
+ (:require [hiredman.clojurebot.core :as core]))
+
+(core/defresponder ::edit 0
+ (core/dfn (and (:addressed? (meta msg))
+ (re-find #"^.* = s/.*/.*/" (core/extract-message bot msg)))) ;;
+ (let [m (core/extract-message bot msg)
+ [_ original replacement] (.split (re-find #"s/.*/.*/" m) "/")]
+ (prn [original replacement])))
+
+(core/remove-dispatch-hook ::edit)

0 comments on commit 9e89ffc

Please sign in to comment.