[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 /w/apostle/graffiti/graffiti_handler.c</h2>-*- LPC -*-
A random graffiti handler<p>Written by Apostle<p>Started 5. April 2007
<h2>Includes</h2>
This class includes the following files /w/apostle/graffiti/graffiti.h<h2>Method index</h2>
<ul>
<li><a href="#add_graffiti">add_graffiti</a>(string, string)<br/>
Adds a new graffiti message.
<li><a href="#add_random_graffiti">add_random_graffiti</a>(mixed, string *)<li><a href="#add_style">add_style</a>(string)<br/>
Adds a new writing style.
<li><a href="#clean_graffiti">clean_graffiti</a>(mixed)<li><a href="#delete_graffiti_room">delete_graffiti_room</a>(mixed)<li><a href="#extra_look">extra_look</a>(mixed)<li><a href="#format_graffiti">format_graffiti</a>(string, mixed)<br/>
Formats a message
Mask this function on the room for non-generic formatting
<li><a href="#graffiti_hidden">graffiti_hidden</a>(string *, mixed, string *)<br/>
Returns a hidden graffiti message
<li><a href="#graffiti_message">graffiti_message</a>(string *)<br/>
Returns a random graffiti message.
<li><a href="#graffiti_style">graffiti_style</a>()<br/>Returns a random writing style 
<li><a href="#query_areas">query_areas</a>()<br/>Returns the list of current areas.
<li><a href="#query_graffiti">query_graffiti</a>(string)<br/>Returns the list of graffiti messages saved.
<li><a href="#query_graffiti_room">query_graffiti_room</a>(mixed, string *)<li><a href="#query_rooms">query_rooms</a>()<li><a href="#query_styles">query_styles</a>()<br/>Returns the list of writing styles saved.
<li><a href="#remove_graffiti">remove_graffiti</a>(string, int, string)<br/>
Deletes an unwanted graffiti message
<li><a href="#remove_style">remove_style</a>(string)<br/>
Deletes a writing style
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="add_graffiti">
add_graffiti</a><pre class="autodocfuncdef">
varargs void add_graffiti(string str,
                          string area)
</pre><dd><br />
Adds a new graffiti message.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the text of the message<br />
area - area in which message should appear
  (universal by default)
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="add_random_graffiti">
add_random_graffiti</a><pre class="autodocfuncdef">
varargs void add_random_graffiti(mixed where,
                                 string * area)
</pre>
<dt class="autodocfuncname"><a name="add_style">
add_style</a><pre class="autodocfuncdef">
void add_style(string str)
</pre><dd><br />
Adds a new writing style.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the style in the format "written on", "carved into", etc
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="clean_graffiti">
clean_graffiti</a><pre class="autodocfuncdef">
mixed clean_graffiti(mixed where)
</pre>
<dt class="autodocfuncname"><a name="delete_graffiti_room">
delete_graffiti_room</a><pre class="autodocfuncdef">
void delete_graffiti_room(mixed where)
</pre>
<dt class="autodocfuncname"><a name="extra_look">
extra_look</a><pre class="autodocfuncdef">
string extra_look(mixed where)
</pre>
<dt class="autodocfuncname"><a name="format_graffiti">
format_graffiti</a><pre class="autodocfuncdef">
varargs string format_graffiti(string str,
                               mixed where)
</pre><dd><br />
Formats a message
Mask this function on the room for non-generic formatting<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - text to format<br />
where - object or filename that overrides this function,
  0 by default
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="graffiti_hidden">
graffiti_hidden</a><pre class="autodocfuncdef">
varargs string graffiti_hidden(string * locs,
                               mixed langs,
                               string * area)
</pre><dd><br />
Returns a hidden graffiti message<br />
<br /><dl>
<dd><b>Parameters:</b><br />
locs - array of possible graffiti locations<br />
langs - possible languages of message, morporkian by default<br />
area - array of areas to select message from,
  universal by default<br />
<br />
<dd><b>Returns:</b>
<br />returns (Random searching message) + random_graffiti() +
  random_style() + (Random loc)<br /><br />
<dd><b>Example:</b>
<br/><pre> return graffiti_hidden( ({ "the wall", "the table", "the door" }) );
 Returns: 
 Looking around, you find "Wombles Say Bing!" carved into the wall.</pre><br/><pre>
 return graffiti_hidden( ({ "the floor", "the wall" }), "agatean",
   ({ "bes pelargic", "agatea" }) );
 Returns:
 Searching around, you find "Death to the Fang!" painted on the wall.
</pre><br /></dl>

<dt class="autodocfuncname"><a name="graffiti_message">
graffiti_message</a><pre class="autodocfuncdef">
varargs string graffiti_message(string * area)
</pre><dd><br />
Returns a random graffiti message.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
area - areas for message (universal by default) 
<br />
<br />
<br /></dl>

<dt class="autodocfuncname"><a name="graffiti_style">
graffiti_style</a><pre class="autodocfuncdef">
string graffiti_style()
</pre><dd><br />Returns a random writing style <br />

<dt class="autodocfuncname"><a name="query_areas">
query_areas</a><pre class="autodocfuncdef">
string * query_areas()
</pre><dd><br />Returns the list of current areas. <br />

<dt class="autodocfuncname"><a name="query_graffiti">
query_graffiti</a><pre class="autodocfuncdef">
varargs string * query_graffiti(string area)
</pre><dd><br />Returns the list of graffiti messages saved.
 * @param area the area of the graffiti, all by default <br />

<dt class="autodocfuncname"><a name="query_graffiti_room">
query_graffiti_room</a><pre class="autodocfuncdef">
varargs string query_graffiti_room(mixed where,
                                   string * langs)
</pre>
<dt class="autodocfuncname"><a name="query_rooms">
query_rooms</a><pre class="autodocfuncdef">
mapping query_rooms()
</pre>
<dt class="autodocfuncname"><a name="query_styles">
query_styles</a><pre class="autodocfuncdef">
string * query_styles()
</pre><dd><br />Returns the list of writing styles saved. <br />

<dt class="autodocfuncname"><a name="remove_graffiti">
remove_graffiti</a><pre class="autodocfuncdef">
varargs int remove_graffiti(string str,
                            int all,
                            string area)
</pre><dd><br />
Deletes an unwanted graffiti message<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the message to remove<br />
all - will remove all copies of str if true<br />
area - area from which to delete message,
  universal by default<br />
<br />
<dd><b>Returns:</b>
<br />returns number of matches deleted
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="remove_style">
remove_style</a><pre class="autodocfuncdef">
varargs int remove_style(string str)
</pre><dd><br />
Deletes a writing style<br />
<br /><dl>
<dd><b>Parameters:</b><br />
str - the message to remove<br />
<br />
<dd><b>Returns:</b>
<br />returns number of matches deleted
<br /><br />
<br /></dl>

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

