[Package Index | Mudlib Index | Effect Index]

File /obj/handlers/bank_handler.c

Keep track of each banks data.

Class Index

Method index

Public Functions

These are functions that everyone can access.

add_new_franchise
void add_new_franchise(string name,
                       string franchise_office)

This method adds a new franchise to the operation.

Parameters:
name - the name of the bank set
franchise_office - the new franchise to add


add_total_ban
int add_total_ban(string player)

Add a player as banned from using banks totally.

Parameters:
player - player name to ban

Returns:
1 if the ban was added, 0 if not


add_withdraw_ban
int add_withdraw_ban(string player)
adjust_account
void adjust_account(string name,
                    string bank_name,
                    int amount)

Change the amount of money a player has at a given bank.

Parameters:
name - the name of the player
bank_name - the name of the bank
amount - the amount to change the balance by


create_new_bank
void create_new_bank(string name,
                     string master)

THis method creates a new bank.

Parameters:
name - the name of the bank
master - the location of the master bank


do_cheat_check
void do_cheat_check(string name,
                    string bank_name,
                    int amount,
                    string str,
                    int after)
get_data_file
int get_data_file(string name)

Start up the system by restoreing the players data.

Parameters:
word - the name of the player being restored


is_player_banned
int is_player_banned(string name,
                     int amount,
                     string bank_name)

Test to see if the player is banned from using the banks.

Parameters:
name - Name of player
amount - Amount they're trying to access
bank_name - Name of bank they're trying to access

Returns:
0 for good to go, 1 for banned.


query_account
int query_account(string word,
                  string bank_name)

Find out how much a player has at a given bank.

Parameters:
word - the name of the player
bank_name - the name of the bank

Returns:
the current balance, -1 on failure


query_accounts
string * query_accounts(string player)

Query the accounts a player has.

Parameters:
player - the name of the player


query_bank_data
class bank_data query_bank_data(string name)

This method is to be used for testing.
query_bank_default_cost_per_month
int query_bank_default_cost_per_month(string name)

This method returns the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


query_bank_default_cost_per_new_account
int query_bank_default_cost_per_new_account(string name)

This method returns the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


query_bank_default_cost_to_open
int query_bank_default_cost_to_open(string name)

This method returns the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


query_bank_franchise_cost_per_month
int query_bank_franchise_cost_per_month(string name,
                                        string franchise_office)

This method returns the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
franchise - the franchise to change the amounts for
amount - the new amount to charge to open


query_bank_franchise_cost_per_new_account
int query_bank_franchise_cost_per_new_account(string name,
                                              string franchise_office)

This method returns the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


query_bank_master_office
string query_bank_master_office(string name)

This method returns the master office of the bank.

Parameters:
name - the bank name to check in

Returns:
the master office of the bank


query_banks
string * query_banks()

This method returns the current list of banks.

Returns:
the current list of banks


query_bans
mapping query_bans()

Query a copy of the current bank gits.

Returns:
The current gits.


query_franchises
string * query_franchises(string bank)

This method returns the franchises for the specified bank.

Parameters:
bank - the bank to get the franchises of

Returns:
the list of franchises


remove_ban
int remove_ban(string name)

Totally remove someone as banned from banking.

Parameters:
name - Name of player to clear as a git

Returns:
Number of git removals performed (0 = not a git)


remove_bank
void remove_bank(string name)

This method removes a bank from the current list ofbanks.

Parameters:
name - the name of the bank to remove


remove_franchise
void remove_franchise(string bank_name,
                      string franchise_location)

Remove an associated franchise from a bank.

Parameters:
bank_name - The friendly name of the bank
franchise_location - base_name of the franchise room


set_account
void set_account(string name,
                 string bank_name,
                 int amount)

Sets the balance at a certain bank to the specificed amount.

Parameters:
name - the name of the player
bank_name - the name of the bank
amount - the amount to set the bank to. Query the accounts a player has.
player - the name of the player


set_bank_default_cost_per_month
void set_bank_default_cost_per_month(string name,
                                     int amount)

This method sets the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


set_bank_default_cost_per_new_account
void set_bank_default_cost_per_new_account(string name,
                                           int amount)

This method sets the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


set_bank_default_cost_to_open
void set_bank_default_cost_to_open(string name,
                                   int amount)

This method sets the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


set_bank_franchise_cost_per_month
void set_bank_franchise_cost_per_month(string name,
                                       string franchise_office,
                                       int amount)

This method sets the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
franchise - the franchise to change the amounts for
amount - the new amount to charge to open


set_bank_franchise_cost_per_new_account
void set_bank_franchise_cost_per_new_account(string name,
                                             int amount)

This method sets the new cost for opening a franchise for the bank.

Parameters:
bank - the bank to change the cost for
amount - the new amount to charge to open


set_bank_master_office
void set_bank_master_office(string name,
                            string master)

This method set the master office of the bank.

Parameters:
name - the bank name to check in
master - the master office of the bank


Classes

These are nice data types for dealing with... Data!