[project @ 2006-06-29 02:01:20 by unknown_lamer]
authorunknown_lamer <unknown>
Thu, 29 Jun 2006 02:01:20 +0000 (02:01 +0000)
committerunknown_lamer <unknown>
Thu, 29 Jun 2006 02:01:20 +0000 (02:01 +0000)
scripts/uname: redelim -> rdelim

AUTHORS
ChangeLog
scripts/uname
source/Bot.C

diff --git a/AUTHORS b/AUTHORS
index 4285e29..0d84ed7 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -5,8 +5,11 @@ eb on IRCNet
 
 Current Maintainer (1.98 and above):
 Clinton Ebadi <clinton@unknownlamer.org>
-unknown_lamer on OpenProjects and OFTC
+unknown_lamer on Freenode and OFTC
 
 Patches by:
 Jos Hulzink
-Dale Smith (Documentation, Detailed Error Reporting)
\ No newline at end of file
+Dale Smith (Documentation, Detailed Error Reporting)
+
+Help by:
+Stelz (for finding all of the corner cases I never run into)
\ No newline at end of file
index 34457b1..83f3b15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,16 @@
 2006-06-28  Clinton Ebadi  <clinton@unknownlamer.org>
 
+       * scripts/uname: redelim -> rdelim
+
        * Release: 2.2.2
 
+       * AUTHORS: Added Stelz to the Help by section
+
+       * source/Bot.C (readConfig): If a logfile starting in / is found
+       the logdir should be set to all but the last part of the filename,
+       and the logfile set to the last part to avoid breaking script
+       logging
+
        * scripts/bobot-utils.scm (bot:match-not-channel): Removed space
        in regex so it works on freenode again
 
index f13bd8a..2e57ca0 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*- scheme -*-
 (use-modules (ice-9 popen)
-            (ice-9 redelim))
+            (ice-9 rdelim))
 
 (define (uname c)
   (let* ((p (open-input-pipe "/bin/uname -a"))
index 25e2f92..6115cce 100644 (file)
@@ -276,8 +276,20 @@ Bot::readConfig()
          {
            if (parameters[(unsigned int)0] == '/')
              {
-               set_log_dir ("/");
-               set_log_file (parameters.subString (1));
+               StringTokenizer log_st (parameters);
+               std::string log_dir = "/";
+
+               for (unsigned int m = log_st.count_tokens ('/');
+                    --m;
+                    m > 0)
+                 {
+                   log_dir += log_st.next_token ('/') + "/";
+                 }
+
+               std::cerr << "==" << log_dir << std::endl;
+
+               set_log_dir (log_dir);
+               set_log_file (log_st.rest ());
              }
            else
              set_log_file (parameters);