--- deliantra/server/ext/books.ext 2007/05/24 03:33:29 1.1 +++ deliantra/server/ext/books.ext 2008/09/23 04:29:11 1.4 @@ -1,4 +1,4 @@ -#! perl # MANDATORY +#! perl # mandatory our @BOOKS; @@ -25,9 +25,7 @@ @BOOKS = @books; } -cf::sync_job { - reload; -}; +reload; sub make_book { my ($book, $level) = @_; @@ -36,13 +34,15 @@ my ($title, @body) = @{$BOOKS[rand @BOOKS]}; - $title = cf::pod::as_text [$title]; + # half-assed attempt to make it a single line text-only title + $title = cf::pod::as_cfpod [$title]; $title =~ s/\n/ /g; $title =~ s/ +$//; + $title =~ s/B<([^>]*)>/$1/g; $book->name ($title); $book->name_pl ($title); $book->title (undef); - $book->msg (cf::pod::as_text \@body); + $book->msg (cf::pod::as_cfpod \@body); }