[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/player_shop.c</h2>
This is the handler for player-run shops.

<p><b>Description</b></p>
</p>
<p>This handler ensures that the very short name (and therefore save file
directories) are unique for each shop.  Anybody may add a new shop but
only a Lord may remove or update an existing shop's details.
</p>
</p><p>Written by Ringo<p>Started 28th January 2001
<h2>Includes</h2>
This class includes the following files /include/player_shop.h and /include/mail.h<h2>Method index</h2>
<ul>
<li><a href="#add_shop">add_shop</a>(string, string)<br/>
Add a shop to the handler.
<li><a href="#auto_mail">auto_mail</a>(string, string, string, string, string)<br/>
Send mail

<li><a href="#query_shop">query_shop</a>(string)<br/>
Query a shop's path.
<li><a href="#query_shops">query_shops</a>()<br/>
Query the list of shops.
<li><a href="#remove_shop">remove_shop</a>(string)<br/>
Remove a shop from the handler.
<li><a href="#update_shop">update_shop</a>(string, string)<br/>
Update a shop's path.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_shop">
add_shop</a><pre class="autodocfuncdef">
int add_shop(string short_name,
             string office_path)
</pre><dd><br />
Add a shop to the handler.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
short_name - The shop name passed to set_very_short()<br />
office_path - The path to the shop's office.<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 if this shop already exists or no such path.<br /><br />
<dd><b>See also:</b>
<br />/std/shops/player_shop/office.c
<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="auto_mail">
auto_mail</a><pre class="autodocfuncdef">
void auto_mail(string to,
               string from,
               string sub,
               string cc,
               string body)
</pre><dd><br />
Send mail
<br />

<dt class="autodocfuncname"><a name="query_shop">
query_shop</a><pre class="autodocfuncdef">
string query_shop(string short_name)
</pre><dd><br />
Query a shop's path.
Used by the office to check this is a valid shop.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
short_name - The shop name passed to set_very_short()<br />
<br />
<dd><b>Returns:</b>
<br />The path to the office, or a blank string if no such shop.<br /><br />
<dd><b>See also:</b>
<br />/std/shops/player_shop/office.c
<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="query_shops">
query_shops</a><pre class="autodocfuncdef">
mapping query_shops()
</pre><dd><br />
Query the list of shops.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />The shops mapping.
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_shop">
remove_shop</a><pre class="autodocfuncdef">
int remove_shop(string short_name)
</pre><dd><br />
Remove a shop from the handler.
Lords only.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
short_name - The shop name passed to set_very_short()<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 if this shop doesn't exist.<br /><br />
<dd><b>See also:</b>
<br />/std/shops/player_shop/office.c
<br /><br /><br /></dl>

<dt class="autodocfuncname"><a name="update_shop">
update_shop</a><pre class="autodocfuncdef">
int update_shop(string short_name,
                string office_path)
</pre><dd><br />
Update a shop's path.
Lords only.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
short_name - The shop name passed to set_very_short()<br />
office_path - The path to the shop's office.<br />
<br />
<dd><b>Returns:</b>
<br />1 on success, 0 if this shop doesn't exists or no such path.<br /><br />
<dd><b>See also:</b>
<br />/std/shops/player_shop/office.c
<br /><br /><br /></dl>

</dl>
[an error occurred while processing this directive]

