Skip to content

Commit

Permalink
Merge /history-enable and /history-disable into /enable-logging command
Browse files Browse the repository at this point in the history
  • Loading branch information
vadmeste committed May 10, 2014
1 parent f271560 commit 33e6d0c
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions extensions/history.scm
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,17 @@
(add-command! /history "history" "/history [BUDDY]"
"Display history page by page")

(define (/history-enable args)
" enable's history "
(set! enable-history-flag "yes")
(ft-display (_ " BUDDY history enabled ")))

(add-command! /history-enable "history-enable" "/history-enable"
"Enables buddy logging")

(define (/history-disable args)
" disable's history "
(set! enable-history-flag "no")
(ft-display (_ " BUDDY history disabled ")))

(add-command! /history-disable "history-disable" "/history-disable"
"Disables buddy logging")
(define (/enable-logging args)
" enable/disable conversations logging"
(cond ((equal? args "no")
(begin
(set! enable-history-flag "no")
(ft-display (_ " BUDDY history disabled "))))
((equal? args "yes")
(begin
(set! enable-history-flag "yes")
(ft-display (_ " BUDDY history enabled "))))
(else (ft-display (_ "Invalid syntax")))))

(add-command! /enable-logging "enable-logging" "/enable-logging"
"enables (`yes') or disables (`no') conversation logging")

0 comments on commit 33e6d0c

Please sign in to comment.