-I ~/projects/gast/Libraries\
-I ./libcloogle
-BINARIES:=IRC cloogle test
+BINARIES:=IRC cloogle #test
all: $(BINARIES)
process` :: (Maybe (Either IRCUser String)) IRCCommand *World -> (Maybe [IRCCommand], *World)
process` (Just (Left user)) (PRIVMSG t m) w
+ | m == "!restart" = (Nothing, w)
| m.[0] == '!'
# (msgs, w) = realProcess (split " " $ m % (1, size m)) w
= (Just $ map (PRIVMSG recipient) msgs, w)
realProcess ["query":xs] w = case xs of
[] = (["query requires one or more arguments"], w)
xs = appFst (split "\n") $ cloogle (join " " xs) w
- realProcess ["restart"] w = abort "Restarted"
realProcess ["restart":_] w = (["restart takes no arguments"], w)
realProcess [c:_] w = ([join " " [
"Unknown cmd: ", c, ", type !help to get help"]], w)