Permalink
Browse files

Mass rename sexpbot=>lazybot

  • Loading branch information...
1 parent 0d3605f commit 6d5c431e6c825705a1622d43126148471e407867 @amalloy amalloy committed Jul 15, 2011
Showing with 151 additions and 151 deletions.
  1. +1 −1 .sexpbot/info.clj
  2. +13 −13 README.markdown
  3. +3 −3 project.clj
  4. +1 −1 sexpbot
  5. +1 −1 sexpbot-opt
  6. +10 −10 src/sexpbot/core.clj
  7. +2 −2 src/sexpbot/gist.clj
  8. +3 −3 src/sexpbot/info.clj
  9. +2 −2 src/sexpbot/irc.clj
  10. +2 −2 src/sexpbot/plugins/brainfuck.clj
  11. +5 −5 src/sexpbot/plugins/clojure.clj
  12. +3 −3 src/sexpbot/plugins/debug.clj
  13. +2 −2 src/sexpbot/plugins/dictionary.clj
  14. +2 −2 src/sexpbot/plugins/eball.clj
  15. +2 −2 src/sexpbot/plugins/embedded.clj
  16. +2 −2 src/sexpbot/plugins/fortune.clj
  17. +3 −3 src/sexpbot/plugins/github.clj
  18. +2 −2 src/sexpbot/plugins/google.clj
  19. +3 −3 src/sexpbot/plugins/haskell.clj
  20. +2 −2 src/sexpbot/plugins/hello_world.clj
  21. +3 −3 src/sexpbot/plugins/help.clj
  22. +2 −2 src/sexpbot/plugins/javadoc.clj
  23. +2 −2 src/sexpbot/plugins/karma.clj
  24. +2 −2 src/sexpbot/plugins/leet.clj
  25. +2 −2 src/sexpbot/plugins/lmgtfy.clj
  26. +3 −3 src/sexpbot/plugins/load.clj
  27. +4 −4 src/sexpbot/plugins/log.clj
  28. +2 −2 src/sexpbot/plugins/logger.clj
  29. +2 −2 src/sexpbot/plugins/login.clj
  30. +3 −3 src/sexpbot/plugins/macro.clj
  31. +3 −3 src/sexpbot/plugins/mail.clj
  32. +3 −3 src/sexpbot/plugins/markov.clj
  33. +2 −2 src/sexpbot/plugins/max.clj
  34. +3 −3 src/sexpbot/plugins/mute.clj
  35. +2 −2 src/sexpbot/plugins/notifo.clj
  36. +3 −3 src/sexpbot/plugins/operator.clj
  37. +3 −3 src/sexpbot/plugins/ping.clj
  38. +3 −3 src/sexpbot/plugins/rss.clj
  39. +2 −2 src/sexpbot/plugins/sed.clj
  40. +3 −3 src/sexpbot/plugins/seen.clj
  41. +2 −2 src/sexpbot/plugins/shorturl.clj
  42. +2 −2 src/sexpbot/plugins/timer.clj
  43. +2 −2 src/sexpbot/plugins/title.clj
  44. +2 −2 src/sexpbot/plugins/translate.clj
  45. +4 −4 src/sexpbot/plugins/utils.clj
  46. +2 −2 src/sexpbot/plugins/weather.clj
  47. +2 −2 src/sexpbot/plugins/whatis.clj
  48. +2 −2 src/sexpbot/registry.clj
  49. +8 −8 src/sexpbot/run.clj
  50. +5 −5 src/sexpbot/twitter.clj
  51. +2 −2 src/sexpbot/utilities.clj
  52. +2 −2 test/sexpbot/core_test.clj
View
@@ -16,7 +16,7 @@
"#clojure" [","]} ; let clojurebot have this one
:servers-port 8080 ; port for plugins that require webserver
"irc.freenode.net" {:channels ["#tempchan"]
- :bot-name "sexpbot-test"
+ :bot-name "lazybot-test"
:bot-password nil
:users {"JohnDoe" {:pass "iliekpie", :privs :admin}
"JaneDoe" {:pass "ohai", :privs :admin}}
View
@@ -1,31 +1,31 @@
-# sexpbot
+# lazybot
-[sexpbot](http://github.com/Raynes/sexpbot) is an IRC bot written in Clojure. Under the hood, it uses [irclj](http://github.com/Raynes/irclj) for talking to IRC. The bot is highly extensible via plugins. Plugins are written in Clojure, using a lightweight DSL. There are already plugins for tons of stuff, including Haskell and Clojure code evaluation, googling, and using the bot as an operator bot. You can view all of the plugins in src/sexpbot/plugins.
+[lazybot](http://github.com/Raynes/lazybot) is an IRC bot written in Clojure. Under the hood, it uses [irclj](http://github.com/Raynes/irclj) for talking to IRC. The bot is highly extensible via plugins. Plugins are written in Clojure, using a lightweight DSL. There are already plugins for tons of stuff, including Haskell and Clojure code evaluation, googling, and using the bot as an operator bot. You can view all of the plugins in src/lazybot/plugins.
-The project aims to create what will eventually be a user-friendly and powerful IRC bot. Whereas clojurebot is mostly aimed at providing helpful services in the #clojure IRC channel, sexpbot is focused on being generally useful to people who aren't Clojurians. However, sexpbot also provides Clojure code evaluation, and is used by some Clojurians in their respective IRC channels primarily for that purpose.
+The project aims to create what will eventually be a user-friendly and powerful IRC bot. Whereas clojurebot is mostly aimed at providing helpful services in the #clojure IRC channel, lazybot is focused on being generally useful to people who aren't Clojurians. However, lazybot also provides Clojure code evaluation, and is used by some Clojurians in their respective IRC channels primarily for that purpose.
## Usage
Several of this bot's plugins require that you have MongoDB installed and running. The core plugins that currently do are mail, whatis, macro, seen, help, fortune and karma. You can find some quickstart guides for setting up MongoDB here: http://www.mongodb.org/display/DOCS/Quickstart. It's usually pretty painless and fast.
-As for what OSes this bot actually runs on: I have no clue. I've seen it run on several Ubuntu distros, but nobody (that I know of) has yet to venture into the world of sexpbot-on-windows or mac. If you do, please let me know how it goes.
+As for what OSes this bot actually runs on: I have no clue. I've seen it run on several Ubuntu distros, but nobody (that I know of) has yet to venture into the world of lazybot-on-windows or mac. If you do, please let me know how it goes.
-Right now, there are no distributions, so the easiest way to run the bot is to clone the repository. Install leiningen or cake and do 'lein deps' or 'cake deps' to install the project's dependencies into the lib/ directory. Additionally, you will need MongoDB installed (in some future version, this will be an optional dependency). Edit .sexpbot/info.clj to put the servers and other information the bot needs to have in there, get MongoDB running, and then run ./sexpbot. After you run the bot the first time, you'll have to edit configuration in ~/.sexpbot/info.clj (the .sexpbot directory is copied to your home directory the first time).
+Right now, there are no distributions, so the easiest way to run the bot is to clone the repository. Install leiningen or cake and do 'lein deps' or 'cake deps' to install the project's dependencies into the lib/ directory. Additionally, you will need MongoDB installed (in some future version, this will be an optional dependency). Edit .lazybot/info.clj to put the servers and other information the bot needs to have in there, get MongoDB running, and then run ./lazybot. After you run the bot the first time, you'll have to edit configuration in ~/.lazybot/info.clj (the .lazybot directory is copied to your home directory the first time).
You can also run `lein uberjar` or `cake uberjar` which will create a standalone jar file for you to use to run the bot. You can just do java -jar jarfile to run it.
-Sexpbot has some basic background functionality. In order to use it, you must have sexpbot uberjar'd. Create a file with any name. This will be your log file, where all the output from the bot is put. Next, rename sexpbot-<version>-standalone.jar to sexpbot.jar (this step will become unnecessary soon). After that, run `java -jar sexpbot.jar --background --logpath /path/to/your/logfile`. sexpbot will then start up and pump logs into the log file. Note however that this is NOT daemon functionality. If you start the bot this way, in order to kill him, you'll have to use the admin-only `die` command from the utils plugin, or look up the process id and kill him the low-level way. I may add full daemon functionality eventually, but this will suffice for now.
+Sexpbot has some basic background functionality. In order to use it, you must have lazybot uberjar'd. Create a file with any name. This will be your log file, where all the output from the bot is put. Next, rename lazybot-<version>-standalone.jar to lazybot.jar (this step will become unnecessary soon). After that, run `java -jar lazybot.jar --background --logpath /path/to/your/logfile`. lazybot will then start up and pump logs into the log file. Note however that this is NOT daemon functionality. If you start the bot this way, in order to kill him, you'll have to use the admin-only `die` command from the utils plugin, or look up the process id and kill him the low-level way. I may add full daemon functionality eventually, but this will suffice for now.
**IMPORTANT: If you load the clojure plugin, you must rename and move "example.policy" to "~/.java.policy" to avoid some troublesome security errors!**
## Commands
-The current list of commands is maintained at [https://github.com/Raynes/sexpbot/wiki/Commands](), and you can find help on any particular command with $help <command> (eg $help fcst).
+The current list of commands is maintained at [https://github.com/Raynes/lazybot/wiki/Commands](), and you can find help on any particular command with $help <command> (eg $help fcst).
## Development
-Contributions to sexpbot are welcome, most often in the form of new plugins. If you have a great idea for something sexpbot could do that would be useful or neat, don't just sit on it: Write a plugin, and send a pull request! But before you get started, take a look at [our plugin policy][before-plugin] and the [plugin quick-start guide][plugin-guide]. If you want to see how much work it takes to write a plugin, take a look at a couple plugins added by developers not on the core team:
+Contributions to lazybot are welcome, most often in the form of new plugins. If you have a great idea for something lazybot could do that would be useful or neat, don't just sit on it: Write a plugin, and send a pull request! But before you get started, take a look at [our plugin policy][before-plugin] and the [plugin quick-start guide][plugin-guide]. If you want to see how much work it takes to write a plugin, take a look at a couple plugins added by developers not on the core team:
* [$tell][], an improvement to $whatis from [ghoseb][]
@@ -36,16 +36,16 @@ Contributions to sexpbot are welcome, most often in the form of new plugins. If
Licensed under the same thing Clojure is licensed under, [the EPL](http://www.eclipse.org/legal/epl-v10.html). You can find a copy in the root of this directory.
-[before-plugin]: https://github.com/Raynes/sexpbot/wiki/Read-this-before-writing-your-plugin
-[plugin-guide]: https://github.com/Raynes/sexpbot/wiki/Plugin-quick-start-guide
-[$findfn]: https://github.com/Raynes/sexpbot/compare/544566f7ee740731ca69...da4fcae5f3afe6cc9e6c
-[$tell]: https://github.com/Raynes/sexpbot/commit/b94c36c52271766c07de9f6bfb7c4d2a429ba498
+[before-plugin]: https://github.com/Raynes/lazybot/wiki/Read-this-before-writing-your-plugin
+[plugin-guide]: https://github.com/Raynes/lazybot/wiki/Plugin-quick-start-guide
+[$findfn]: https://github.com/Raynes/lazybot/compare/544566f7ee740731ca69...da4fcae5f3afe6cc9e6c
+[$tell]: https://github.com/Raynes/lazybot/commit/b94c36c52271766c07de9f6bfb7c4d2a429ba498
[ghoseb]: https://github.com/ghoseb
[jColeChanged]: https://github.com/jColeChanged
## Contributors
-These are people who have contributed to sexpbot since the beginning. These may not all be active contributors. Even one-off contributors will be added to this list.
+These are people who have contributed to lazybot since the beginning. These may not all be active contributors. Even one-off contributors will be added to this list.
* Anthony Grimes ([Raynes](https://github.com/Raynes))
* Alan Malloy ([amalloy](https://github.com/amalloy))
View
@@ -1,4 +1,4 @@
-(defproject sexpbot "0.6.2"
+(defproject lazybot "0.6.2"
:description "FIXME: write"
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
@@ -21,6 +21,6 @@
[fnparse "2.2.7"]
[amalloy/utils "[0.3.6,)"]]
:dev-dependencies [[swank-clojure "1.2.1"]]
- :uberjar-name "sexpbot"
- :main sexpbot.run
+ :uberjar-name "lazybot"
+ :main lazybot.run
:resources-path "resource")
View
@@ -1 +1 @@
-java -cp lib/*:src/:resource clojure.main -e "(use 'sexpbot.run) (-main)"
+java -cp lib/*:src/:resource clojure.main -e "(use 'lazybot.run) (-main)"
View
@@ -1 +1 @@
-java -XX:ReservedCodeCacheSize=6m -Xms10m -Xmx120m -cp lib/*:src/ clojure.main -e "(use 'sexpbot.run) (-main)"
+java -XX:ReservedCodeCacheSize=6m -Xms10m -Xmx120m -cp lib/*:src/ clojure.main -e "(use 'lazybot.run) (-main)"
View
@@ -1,5 +1,5 @@
-(ns sexpbot.core
- (:use [sexpbot registry info]
+(ns lazybot.core
+ (:use [lazybot registry info]
[clj-config.core :only [read-config]]
[clojure.stacktrace :only [root-cause]]
[somnium.congomongo :only [mongo!]]
@@ -13,7 +13,7 @@
(defonce initial-info (eval (read-config info-file)))
(try
- (mongo! :db (or (:db initial-info) "sexpbot"))
+ (mongo! :db (or (:db initial-info) "lazybot"))
(catch Throwable e
(println "Error starting mongo (see below), carrying on without it")
(.printStackTrace e *out*)))
@@ -35,10 +35,10 @@
(alter bot assoc :config (eval (read-config info-file))))
(defn require-plugin [plugin]
- (require (symbol (str "sexpbot.plugins." plugin)) :reload))
+ (require (symbol (str "lazybot.plugins." plugin)) :reload))
(defn load-plugin [irc refzors plugin]
- ((resolve (symbol (str "sexpbot.plugins." plugin "/load-this-plugin"))) irc refzors))
+ ((resolve (symbol (str "lazybot.plugins." plugin "/load-this-plugin"))) irc refzors))
(defn require-plugins []
(doseq [plug ((eval (read-config info-file)) :plugins)]
@@ -74,17 +74,17 @@
(def sroutes nil)
(defn route [rs]
- (alter-var-root #'sexpbot.core/sroutes (constantly (apply routes rs))))
+ (alter-var-root #'lazybot.core/sroutes (constantly (apply routes rs))))
(defn reload-all
- "A clever function to reload everything when running sexpbot from SLIME.
+ "A clever function to reload everything when running lazybot from SLIME.
Do not try to reload anything individually. It doesn't work because of the nature
of plugins. This makes sure everything is reset to the way it was
when the bot was first loaded."
[& bots]
- (require 'sexpbot.registry :reload)
- (require 'sexpbot.utilities :reload)
- (require 'sexpbot.twitter :reload)
+ (require 'lazybot.registry :reload)
+ (require 'lazybot.utilities :reload)
+ (require 'lazybot.twitter :reload)
(require-plugins)
(route (extract-routes bots))
(doseq [{:keys [com bot]} bots]
@@ -1,6 +1,6 @@
-(ns sexpbot.gist
+(ns lazybot.gist
(:use [clj-github.gists :only [new-gist]]
- [sexpbot.utilities :only [trim-string]])
+ [lazybot.utilities :only [trim-string]])
(:require [clojure.contrib.string :as string])
(:import [java.io IOException]))
@@ -1,9 +1,9 @@
-(ns sexpbot.info
+(ns lazybot.info
(:import java.io.File
org.apache.commons.io.FileUtils))
-(def sexpdir (File. (str (System/getProperty "user.home") "/.sexpbot" )))
+(def sexpdir (File. (str (System/getProperty "user.home") "/.lazybot" )))
(def info-file (str sexpdir "/info.clj"))
(when-not (.exists sexpdir)
- (FileUtils/copyDirectory (File. (str (System/getProperty "user.dir") "/.sexpbot")) sexpdir))
+ (FileUtils/copyDirectory (File. (str (System/getProperty "user.dir") "/.lazybot")) sexpdir))
View
@@ -1,5 +1,5 @@
-(ns sexpbot.irc
- (:use [sexpbot core info]
+(ns lazybot.irc
+ (:use [lazybot core info]
[clj-config.core :only [read-config]]
[amalloy.utils :only [decorate keywordize]])
(:require [irclj.core :as ircb]))
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.brainfuck
- (:use sexpbot.registry))
+(ns lazybot.plugins.brainfuck
+ (:use lazybot.registry))
;;; From Rosettacode ;;;
(def *input*)
@@ -1,11 +1,11 @@
-(ns sexpbot.plugins.clojure
+(ns lazybot.plugins.clojure
(:use clojure.stacktrace
(clojail testers core)
- sexpbot.registry
+ lazybot.registry
clojure.contrib.logging
- [sexpbot.utilities :only [on-thread]]
- [sexpbot.plugins.shorturl :only [is-gd]]
- [sexpbot.gist :only [trim-with-gist]]
+ [lazybot.utilities :only [on-thread]]
+ [lazybot.plugins.shorturl :only [is-gd]]
+ [lazybot.gist :only [trim-with-gist]]
[name.choi.joshua.fnparse :only [rule-match term failpoint alt complex rep*]]
[amalloy.utils :only [verify]]
(amalloy.utils [transform :only [transform-if]]
@@ -1,6 +1,6 @@
-(ns sexpbot.plugins.debug
- (:use sexpbot.registry
- [sexpbot.plugins.login :only [when-privs]])
+(ns lazybot.plugins.debug
+ (:use lazybot.registry
+ [lazybot.plugins.login :only [when-privs]])
(:require [clojure.string :as string]))
(defn get-mode [old-mode user-arg]
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.dictionary
- (:use [sexpbot registry]
+(ns lazybot.plugins.dictionary
+ (:use [lazybot registry]
[clojure-http.client :only [add-query-params]]
[clojure.contrib.json :only [read-json]])
(:require [clojure-http.resourcefully :as res])
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.eball
- (:use [sexpbot registry]))
+(ns lazybot.plugins.eball
+ (:use [lazybot registry]))
(def responses
["As I see it, yes."
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.embedded
- (:use [sexpbot registry]))
+(ns lazybot.plugins.embedded
+ (:use [lazybot registry]))
(defplugin :irc
(:hook
@@ -1,7 +1,7 @@
; Written by Programble <programble@gmail.com>
; Licensed under the EPL
-(ns sexpbot.plugins.fortune
- (:use [sexpbot registry info]
+(ns lazybot.plugins.fortune
+ (:use [lazybot registry info]
[somnium.congomongo :only [fetch fetch-one insert! destroy!]]))
(defplugin
@@ -1,6 +1,6 @@
-(ns sexpbot.plugins.github
- (:use sexpbot.registry
- [sexpbot.plugins.shorturl :only [is-gd]]
+(ns lazybot.plugins.github
+ (:use lazybot.registry
+ [lazybot.plugins.shorturl :only [is-gd]]
[compojure.core :only [POST]]
clojure.contrib.json)
(:require [clojure.contrib.string :as s])
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.google
- (:use [sexpbot registry [utilities :only [trim-string]]]
+(ns lazybot.plugins.google
+ (:use [lazybot registry [utilities :only [trim-string]]]
[clojure-http.client :only [add-query-params]]
[clojure.contrib.json :only [read-json]])
(:require [clojure-http.resourcefully :as res]
@@ -1,9 +1,9 @@
-(ns sexpbot.plugins.haskell
- (:use [sexpbot registry]
+(ns lazybot.plugins.haskell
+ (:use [lazybot registry]
[clojure.contrib.json :only [read-json]]
[clojure-http.client :only [add-query-params]]
[clojure.java.shell :only [sh]]
- [sexpbot.gist :only [trim-with-gist]])
+ [lazybot.gist :only [trim-with-gist]])
(:require [clojure-http.resourcefully :as res]))
(def tryurl "http://tryhaskell.org/haskell.json")
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.hello-world
- (:use sexpbot.registry))
+(ns lazybot.plugins.hello-world
+ (:use lazybot.registry))
(defplugin
(:cmd
@@ -1,7 +1,7 @@
;; Written by Erik (boredomist)
-(ns sexpbot.plugins.help
- (:use [sexpbot registry info]
- [sexpbot.plugins.login :only [when-privs]]
+(ns lazybot.plugins.help
+ (:use [lazybot registry info]
+ [lazybot.plugins.login :only [when-privs]]
[clojure.string :only [join]]
[somnium.congomongo :only [fetch fetch-one insert! destroy!]]))
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.javadoc
- (:use sexpbot.registry)
+(ns lazybot.plugins.javadoc
+ (:use lazybot.registry)
(:require [clojure.string :as s]))
(def ^{:dynamic true}
@@ -1,8 +1,8 @@
; Written by Michael D. Ivey <ivey@gweezlebur.com>
; Licensed under the EPL
-(ns sexpbot.plugins.karma
- (:use [sexpbot registry info]
+(ns lazybot.plugins.karma
+ (:use [lazybot registry info]
[amalloy.utils :only [keywordize]]
[somnium.congomongo :only [fetch-one insert! destroy!]]))
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.leet
- (:use sexpbot.registry))
+(ns lazybot.plugins.leet
+ (:use lazybot.registry))
(defn char-to-leet [c]
(condp = c
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.lmgtfy
- (:use [sexpbot registry]))
+(ns lazybot.plugins.lmgtfy
+ (:use [lazybot registry]))
(defn create-url [args]
(str "http://www.lmgtfy.com/?q=" (apply str (interpose "+" args))))
@@ -1,6 +1,6 @@
-(ns sexpbot.plugins.load
- (:use [sexpbot registry core irc]
- [sexpbot.plugins.login :only [when-privs]]))
+(ns lazybot.plugins.load
+ (:use [lazybot registry core irc]
+ [lazybot.plugins.login :only [when-privs]]))
(defplugin
(:cmd
@@ -1,13 +1,13 @@
-(ns sexpbot.plugins.log
- (:use (sexpbot registry utilities)
- [sexpbot.plugins.login :only [when-privs]]
+(ns lazybot.plugins.log
+ (:use (lazybot registry utilities)
+ [lazybot.plugins.login :only [when-privs]]
clojure.contrib.logging)
(:import [org.apache.log4j Level]))
(defn str->package [s]
(if (not= (.indexOf s ".") -1)
s
- (str "sexpbot.plugins." s)))
+ (str "lazybot.plugins." s)))
(defn all-loaded-plugins [bot]
(let [module-list (-> bot :modules keys)]
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.logger
- (:use [sexpbot registry]
+(ns lazybot.plugins.logger
+ (:use [lazybot registry]
[clj-time.core :only [now from-time-zone time-zone-for-offset]]
[clj-time.format :only [unparse formatters]]
[clojure.java.io :only [file]])
@@ -1,5 +1,5 @@
-(ns sexpbot.plugins.login
- (:use [sexpbot registry]))
+(ns lazybot.plugins.login
+ (:use [lazybot registry]))
(defn logged-in [bot]
(or (:logged-in bot)
@@ -1,6 +1,6 @@
-(ns sexpbot.plugins.macro
- (:use [sexpbot registry info]
- [sexpbot.plugins.login :only [when-privs]]
+(ns lazybot.plugins.macro
+ (:use [lazybot registry info]
+ [lazybot.plugins.login :only [when-privs]]
clj-config.core
[somnium.congomongo :only [fetch fetch-one insert! destroy!]]))
@@ -1,7 +1,7 @@
-(ns sexpbot.plugins.mail
+(ns lazybot.plugins.mail
(:refer-clojure :exclude [extend])
- (:use [sexpbot registry info]
- [sexpbot.plugins.login :only [when-privs]]
+ (:use [lazybot registry info]
+ [lazybot.plugins.login :only [when-privs]]
[clj-time core format]
[somnium.congomongo :only [fetch fetch-one insert! destroy!]]))
Oops, something went wrong.

0 comments on commit 6d5c431

Please sign in to comment.