;;; -*- guile-scheme -*-
;;; test of bot-adduser
(load "bobot-utils.scm")

;;; test this!
(define (scheme-adduser who channel level protect aop expire passwd)
  (let ((level (string->number level))
	(protect (string->number protect))
	(aop 
	 (if (= 1 (string->number aop))
	   #t #f ))
	(expire (string->number expire)))
    (bot-adduser who channel level protect aop expire passwd)))

(bot-addcommand "sadduser" scheme-adduser #f 7 4)

(define (test-adduser)
  (bot-log "Adding lap_r_g\n") 
  (bot-adduser "lap_r_g" "#*" 4 0 #f)
  (bot-log "Adding CowBot\n") 
  (bot-adduser "CowBot" "#*" 2 0 #f "2M18H")
  (bot-log "Adding ZugBut\n")
  (bot-adduser "ZugBot" "#*" 2 0 #f "1Y" "moo")
  (bot-log "Done...\n"))

(bot-addcommand "testadduser" test-adduser #f 0 4)

(define (test-addshit)
  (bot-log "Adding root")
  (bot-addshit "*!root@*.*" "*" 2))

(bot-addcommand "testaddshit" test-addshit #f 0 4)