summaryrefslogtreecommitdiff
diff options
authorAidan Gauland <[email protected]>2012-12-02 21:01:33 +1300
committerAidan Gauland <[email protected]>2012-12-02 21:01:33 +1300
commited54ba16fa501fa0773c6927cbf50d8a2e65fb12 (patch)
treeba6da1cca91474ac2fe596cb816634738967db2f
parent8b1eba06925d6e82a5150f0ede5e5e781949a1f5 (diff)
downloadcunningbot-master.tar.gz
Tidied modulesHEADmaster
Renamed modules to have a conventional (library module) layout (and to avoid (commands) colliding with something else).
-rwxr-xr-xbot.scm (renamed from cunning-bot.scm)4
-rw-r--r--commands.scm4
-rw-r--r--run-cbot.scm3
3 files changed, 5 insertions, 6 deletions
diff --git a/cunning-bot.scm b/bot.scm
index b06858c..c3ca5ef 100755
--- a/cunning-bot.scm
+++ b/bot.scm
@@ -14,7 +14,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(define-module (cunning-bot)
+(define-module (cunning-bot bot)
#:use-module (ice-9 rdelim)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
@@ -196,7 +196,7 @@ catching and reporting any errors."
(catch #t
(lambda ()
(let ((result (eval (list command sender args)
- (resolve-module '(commands)))))
+ (resolve-module '(cunning-bot commands)))))
(if (string? result)
(begin
(debug "Command ran successfully.~%")
diff --git a/commands.scm b/commands.scm
index befc26b..30904ec 100644
--- a/commands.scm
+++ b/commands.scm
@@ -14,8 +14,8 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(define-module (commands)
- #:use-module (cunning-bot))
+(define-module (cunning-bot commands)
+ #:use-module (cunning-bot bot))
(define-public (flay sender args)
(if (string-null? args)
diff --git a/run-cbot.scm b/run-cbot.scm
index 7578c99..961a65a 100644
--- a/run-cbot.scm
+++ b/run-cbot.scm
@@ -16,8 +16,7 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(add-to-load-path "./")
-(use-modules (cunning-bot))
+(use-modules (cunning-bot bot))
(load "commands.scm")
(define bot (make-bot "Cunning_Bot" "Cunning_Bot" "Cunning Bot" "irc.example.net" 6667))