# Copyright (c) 2004 Alan W. Mahoney. All rights reserved. 
# This program is free software.  You may modify and/or 
# distribute it under the same terms as Perl itself.  
# This copyright notice must remain attached to the file.  

# $Id: escrowbot.conf 2 2004-11-29 00:47:38Z alan $

# Use this file in this wise: invbot.pl ./escrowbot.conf

$testing = 1;
$test_users = 'tester1|tester2';

$helpscript = << '__DONE__';
PRIVATE BETA
EVERYTHING YOU SEND TO THIS ACCOUNT IS CONSIDERED A DONATION

Thank you for contacting an escrowbot running $FILE $VERSION. Fnord7 is the current maintainer.  Contact him when you lose things to me.

How it works:
Ideally persons A and B make the deal ahead of time.

A mails escrowbot the items to be offered.
A creates desires using "ask"
A offers using "offer"
A independently mails B that the offer is ready
B queries the offer using "status UID_A"
B sends the items asked for
B accepts using "accept UID_A"

A may cancel at any point using "cancel," which sends everything winging home

ask #@item: add these to the items required for a transaction
offer UID_B: make the offer open to player UID
status (UID_A): display the status of an offer
accept UID_A: accept offer with player UID_A
cancel: send your things back to you, cancelling an offer you have made

Liabilities: A is LOCKED into the offer until it is cancelled or accepted.  A cannot even look at the status for offers recieved until this one is resolved. Anything further that A sends is considered part of the offer.  Possible overflow bugs with very large amounts of money. Transactions not implemented in DB.  No timeouts.

Website: http://www.brandybuck.com/kolbot/
__DONE__
	
$config = {
  sescrow => 1,
  transactions => 0,
  commands  => {
    use  => 0,
    make => 0,
    create => 0,
    send => 0,
    checkout => 0,
  },
  owner     => 'Fnord7',
  delay     => 60,
  logfile   => 'escrowbot.log',     # none
  smtype    => 'db',	
  statedir  => './state',	# Only for FileStateManager
  db_conf   => {
    autocommit => 1,		# Currently required for both
    dbms       => 'mysql4',
    dbname     => 'kol',
    dbhost     => 'host',
    dbuser     => 'escrowbot',
    dbpasswd   => 'apassword',
    table_pre  => 'ebot_',
  },
};

if($testing) {
  $config->{logfile}   = 'ebottest.log';
  $config->{db_conf}->{table_pre} = 'ebot_t_';
};
  
$bot_conf = [{
  site      => 'http://www3.kingdomofloathing.com/',
  user      => 'botname',
  user_id   => botid,
  class     => 'pm',	
  password  => 'as9if',
  timeout   => 180,		# Default timeout
  timeout_login => 180,		# Timeout when logging in
  delay     => 60,		# Seconds
  # Be nice to the logs
  agent     => "escrowbot/$VERSION",
  cookie_file => "escrowbot.cookies.txt", 
},
];
