Index: /irpg/trunk/ChangeLog
===================================================================
--- /irpg/trunk/ChangeLog	(revision 1449)
+++ /irpg/trunk/ChangeLog	(revision 1449)
@@ -0,0 +1,108 @@
+This is the ChangeLog for the Idle RPG Website Code. I'm not as religious about
+making sure my updates make it here as I am about changes to the IRPG code
+making it into that ChangeLog, so there may be changes between versions that you
+don't see listed here.
+
+Also, please note that any use of "incowrect" or other cow-related "typos" are
+NOT typos. I like cattle. A lot. Please stop fixing them :^)
+
+2004-07-17  Jon Honeycutt  <jotun@idlerpg.net>
+    * huge modification of the entire source by the original coder, res0
+      <bk@slashnet.org>. res0 has really helped this project through his many
+      contributions; it wouldn't be where it is today without him. thanks, res0!
+      * New site layout (valid XHTML 1.1 strict) using CSS
+      * Cleaned up PHP
+      * User maps do not display unless visitor clicks 'display' link
+    * changed fgets() calls to add the optional second parameter (for old PHPs)
+    * removed incorrect header() in makequestmap() (mikegrb)
+    * checked to make sure key $_SESSION['time'] was set before attempting to
+      reference it (HarK0nNeN)
+    * db.php's table tag now specifies the number of rows and columns to make
+      drawing faster in browsers that pay attention to it (res0)
+    * header("Location: ") directives now give full URIs
+    * made better use of htmlentities() and urlencode()s as relates to display
+      of usernames and classes
+    * users on quest and world maps are now clickable, leading to their player
+      info page (John Nielsen)
+
+2004-05-31  Jon Honeycutt  <jotun@idlerpg.net>
+    * changed players.php to show offline users as gray, this style is in
+      header.php, patch from Chewie <chewie@f2o.org>
+    * changed map-drawing PHP scripts to draw a transparent image which is then
+      overlayed (using CSS) over the static newmap.png image. changed the map
+      drawing frequency to 1/user/20s as I think this greatly decreases CPU
+      usage. changed the maperror.png to something more appropriate. $mapx
+      and $mapy in config.php describe the dimensions of your map file (Rick)
+    * fixed quest.php to show proper coordinates; another evil c/p error (Rick)
+
+2004-05-23  Jon Honeycutt  <jotun@idlerpg.net>
+    * changed most everything to make sense with the new database
+    * edited dump.php to display data in the same format, despite the new
+      database format. 
+    * added an xml.php page that takes a 'player' argument and displays
+      information on that user in xml 1.0 format. should allow a better API
+      as far as compatibility with newer dbs goes
+    * changed playerview.php to use fgets() to read from modifiers.txt.
+      hopefully this is much faster
+    * edited playerview.php to show map and XML data link
+    * changed the counter in footer.php to strip the leading path information
+      from $_SERVER['PHP_SELF'] before using it to identify the page
+    * removed some unused $i variable from players.php
+    * created quest.php which shows active quest info
+    * created makequestmap.php which draws a quest map if quest type is 2,
+      redirects otherwise
+    * created worldmap.php which shows the active state of the irpg world
+    * created makeworldmap.php which draws the world map
+    * created makemap.php which takes a 'player' argument and draws them on the
+      map
+    * commonfunctions.php now has functions to sort by isadmin flag and player
+      alignment
+    * index.php updated with information on the new game features
+    * changed titles on several pages to use $irpg_chan instead of hard-coded
+      #G7
+    * updated header.php to link to new pages and idlerpg.net forum
+    * changed 'time modifiers' to 'character modifiers' as item modifiers are
+      now stored, also
+
+2004-05-23  Alexander Hirzel  <chewie@f2o.org>
+    * submitted a series of patches to correct, among other things, the horrible
+      use of <td> where <th> was more appropriate
+
+2004-04-22  Jon Honeycutt  <jotun@idlerpg.net>
+	* if $_GET['alltime'] wasn't set, < and > in time modifiers were not
+	  translated to &lt; and &gt; (thanks DinTx)
+	* attempted to fix playerview.php from showing others' stats, traded
+	  stristr() for strstr() matching either "^name ", " name ", or "^name's "
+
+2004-04-23  Jonathan Attwell <caffeen@caffeen.org>
+	* created README, detailing how users are to install and what to edit.
+	* created config.php, which holds all the setup variables.
+	* cleaned up some of the php coding.
+
+2004-04-15  Jon Honeycutt  <jotun@ultrazone.org>
+	* we now stripslashes() on $_GET['player'] for players.php,
+	  playerview.php, dump.php (thanks Diab)
+
+2004-04-05  Jon Honeycutt  <jotun@ultrazone.org>
+	* removed some of parallax's tabs :^)
+	* edited players.php to forward requests for specific players to the proper
+	  playerview.php
+	* changed links in sitesource.php to be fully-qualified
+	* removed preg_grep in playerview.php, which insecurely used tainted
+	  data. switched to stristr. (thanks mike@ethernal.org)
+	* stripped < and > from modifiers.txt output (thanks mike@ethernal.org)
+	* changed link to idlerpg-adv.txt in players.php to be fully-qualified.
+	  (thanks daxxar)
+	* may've made other changes, not sure.
+
+2004-02-15  Jon Honeycutt  <jotun@ultrazone.org>
+	* edited source.php to provide fully-qualified URLs to source files;
+	  easier for users to follow license.
+	* playerview.php's 'View all Time Modifiers' link now displays the
+	  number of time modifiers.
+	* contact.php now sends a From: field in its headers parameter.
+
+2004-01-31  Titus Barik  <titus@barik.net>
+	* created ChangeLog, following Debian ChangeLog format.
+	* modified header.php to be location independent via $BASE_URL var.
+	* players.php and playerview.php are now separate files.
Index: /irpg/trunk/README
===================================================================
--- /irpg/trunk/README	(revision 1449)
+++ /irpg/trunk/README	(revision 1449)
@@ -0,0 +1,42 @@
+------------------------------------------
+IRPG Website Code README v1.1 (2004-06-27)
+------------------------------------------
+
+-----------
+  Notes
+-----------
+
+Homepage:	http://idlerpg.net
+License :	Public Domain
+
+-----------
+ Versions
+-----------
+
+Site:	v0.5 [current/changes courtesy of res0], Released July 17th, 2004.
+Bot :	v3.1.2 [current], Released June 6th, 2004.
+
+------------
+Installation
+------------
+
+1. Make sure you have the bot functional and running.
+2. Copy all the files here to your public_html or some folder.
+3. Edit config.php with your favorite editor.
+4. chmod 644 * && chmod 666 hits.db
+5. If you change the default settings in the IRPG bot (for example, if you turn
+   off the option to write quest info to file, you'll have to manually edit
+   some scripts to take this into account. If you disable the INFO command,
+   you might want to remove it from the index.php page.
+6. Some code in this package requires that your system have GD 2.0+ (or have it
+   enabled in your php.ini, on Win32). If you don't want this functionality to
+   be available, edit the script playerview.php to remove the use of the map
+   and header.php to remove the links to the world map and the quest info page.
+   You can also delete the worldmap.php, makeworldmap.php, makemap.php,
+   quest.php, and makequestmap.php scripts.
+7. Edit the website ANY WAY you see fit. You don't have to keep all of the links
+   to me, I just thought they might be useful or interesting to users :^)
+8. The best way to receive support for these scripts is to post to the Help
+   section of the forum, http://idlerpg.net/forum.php, not via e-mail or IRC.
+   If you notice a bug, however, you may use any method to contact me.
+   Thanks :^)
Index: /irpg/trunk/admincomms.txt
===================================================================
--- /irpg/trunk/admincomms.txt	(revision 1449)
+++ /irpg/trunk/admincomms.txt	(revision 1449)
@@ -0,0 +1,65 @@
+This is not the full list of commands for the Idle RPG bot, but only the list
+of admin commands. For more information on the Idle RPG bot, visit
+http://idlerpg.net/
+
+INFO, retrieve some fairly useless stats about the bot.
+
+DIE, kills the bot.
+
+HOG, summon the Hand of God spell. See the main help file.
+
+RESTART, restarts the bot.
+
+CHPASS <char name> <new password>, change a character's pass in the IRPG.
+
+CHCLASS <char name> <new class name>, change a character's class in the IRPG.
+
+CHUSER <char name> <new char name>, change a character's username in the IRPG.
+     Please only use in very special circumstances; otherwise, have them form
+     a new player and DEL the old one. This should not let you overwrite an
+     existing account, but is untested.
+
+PUSH <char name> <seconds>, push a player toward his goal by subtracting time
+     from his next time to level. Please use this only if bot has mistakenly
+     penalized someone. You could also use this to punish a user by setting
+     the number of seconds to a negative number. Don't do that.
+
+DEL <char name>, remove a user's account.
+
+JUMP <server[:port]>, move the bot to another server.
+
+SILENT <mode>, switch bot between 4 modes of silence.
+     - mode 0, bot sends all privmsgs.
+     - mode 1, only chanmsg() is disabled.
+     - mode 2, only privmsg()/notice() to non-channels is disabled.
+     - mode 3, privmsgs/notices to users and channels are disabled.
+
+BACKUP, tell bot to copy $opts{'dbfile'} to .dbbackup/$opts{'dbfile'}TIMESTAMP
+
+RELOADDB, force bot to reload player database file, rewriting all memory.
+     RELOADDB can only be used while in pause mode.
+
+PAUSE, toggle pause mode.
+
+PEVAL <code>, execute arbitrary argument as Perl code. Queues output > 3 lines
+     or >1k of text. Some useful PEVAL commands:
+       - Delete all accounts not logged in in 4 weeks (See also: DELOLD):
+         /msg bot PEVAL delete $rps{$_} for grep { time()-$rps{$_}{lastlogin} > 3600*24*7*4 && !$rps{$_}{online} } keys %rps;
+       - Remove one hour from everyone's clocks:
+         /msg bot PEVAL $rps{$_}{next} -= 3600 for keys %rps;
+       - List all online users, separated by commas:
+         /msg bot PEVAL join(', ',grep { $rps{$_}{online} } keys %rps);
+       - View contents of a file on remote host:
+         /msg bot peval `cat file`
+       - Turn on debug mode:
+         /msg bot peval $opts{debug}=1;
+       - Force write-out of database:
+         /msg bot peval writedb();
+
+DELOLD <days>, remove all non-logged-in accounts inactive in the last <days>
+     days.
+
+CLEARQ, clear the outgoing message queue. Useful to use if someone floods the
+     bot with a lot of text that it plans to respond to.
+
+MKADMIN <username>, set the isadmin flag for a given username.
Index: /irpg/trunk/commonfunctions.php
===================================================================
--- /irpg/trunk/commonfunctions.php	(revision 1449)
+++ /irpg/trunk/commonfunctions.php	(revision 1449)
@@ -0,0 +1,101 @@
+<?php
+// définition des locales :
+setlocale(LC_ALL, $language);
+bindtextdomain('irpg', './lang');
+textdomain('irpg');
+
+
+    function duration($s) {
+        $s = abs(intval($s));
+        if ($s == 0) return "Aucune";
+        return sprintf("%d jour%s, %02d:%02d:%02d",
+                       $s/86400,intval($s/86400)<=1?"":"s",
+                       ($s%86400)/3600,($s%3600)/60,$s%60);
+    }
+    function cmp_level_asc($a,$b) { return cmp_level_desc($b,$a); }
+    function cmp_level_desc($a,$b) {
+        list(,,,$level1,,$time1)=explode("\t",trim($a));
+        list(,,,$level2,,$time2)=explode("\t",trim($b));
+        if ($level1 == $level2) return ($time1 <= $time2) ? -1 : 1;
+        return ($level1 > $level2) ? -1 : 1;
+    }
+    function cmp_alignment_asc($a,$b) { return cmp_alignment_desc($b,$a); }
+    function cmp_alignment_desc($a,$b) {
+        list(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$a1)=explode("\t",trim($a));
+        list(,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,$a2)=explode("\t",trim($b));
+        if ($a1 == "g" || $a2 == "e") return -1;
+        if ($a1 == "e" || $a2 == "g") return 1;
+        return 0;
+    }
+    function cmp_isadmin_asc($a,$b) { return cmp_isadmin_desc($b,$a); }
+    function cmp_isadmin_desc($a,$b) {
+        list(,,$o1)=explode("\t",trim($a));
+        list(,,$o2)=explode("\t",trim($b));
+        return ($o1 > $o2) ? -1 : 1;
+    }
+    function cmp_ttl_asc($a,$b) { return cmp_ttl_desc($b,$a); }
+    function cmp_ttl_desc($a,$b) {
+        list(,,,,,$time1)=explode("\t",trim($a));
+        list(,,,,,$time2)=explode("\t",trim($b));
+        return ($time2 < $time1) ? -1 : 1;
+    }
+    function cmp_user_asc($a,$b) { return cmp_user_desc($b,$a); }
+    function cmp_user_desc($a,$b) {
+        list($u1)=explode("\t",trim($a));
+        list($u2)=explode("\t",trim($b));
+        return (strtolower($u1) > strtolower($u2)) ? -1 : 1;
+    }
+    function cmp_online_asc($a,$b) { return cmp_online_desc($b,$a); }
+    function cmp_online_desc($a,$b) {
+        list(,,,,,,,,$o1)=explode("\t",trim($a));
+        list(,,,,,,,,$o2)=explode("\t",trim($b));
+        return ($o1 > $o2) ? -1 : 1;
+    }
+    function cmp_idled_asc($a,$b) { return cmp_idled_desc($b,$a); }
+    function cmp_idled_desc($a,$b) {
+        list(,,,,,,,,,$i1)=explode("\t",trim($a));
+        list(,,,,,,,,,$i2)=explode("\t",trim($b));
+        return ($i1 > $i2) ? -1 : 1;
+    }
+    function cmp_created_asc($a,$b) { return cmp_created_desc($b,$a); }
+    function cmp_created_desc($a,$b) {
+        list(,,,,,,,,,,,,,,,,,,,$i1)=explode("\t",trim($a));
+        list(,,,,,,,,,,,,,,,,,,,$i2)=explode("\t",trim($b));
+        return ($i1 > $i2) ? -1 : 1;
+    }
+    function cmp_lastlogin_asc($a,$b) { return cmp_lastlogin_desc($b,$a); }
+    function cmp_lastlogin_desc($a,$b) {
+        list(,,,,,,,,,,,,,,,,,,,,$i1)=explode("\t",trim($a));
+        list(,,,,,,,,,,,,,,,,,,,,$i2)=explode("\t",trim($b));
+        return ($i1 > $i2) ? -1 : 1;
+    }
+    function cmp_uhost_asc($a,$b) { return cmp_uhost_desc($b,$a); }
+    function cmp_uhost_desc($a,$b) {
+        list(,,,,,,,$u1)=explode("\t",trim($a));
+        list(,,,,,,,$u2)=explode("\t",trim($b));
+        return (strtolower($u1) > strtolower($u2)) ? -1 : 1;
+    }
+    function cmp_pen_asc($a,$b) { return cmp_pen_desc($b,$a); }
+    function cmp_pen_desc($a,$b) {
+        list(,,,,,,,,,,,,$p1[0],$p1[1],$p1[2],$p1[3],$p1[4],$p1[5],
+        $p1[6])=explode("\t",trim($a));
+        list(,,,,,,,,,,,,$p2[0],$p2[1],$p2[2],$p2[3],$p2[4],$p2[5],
+        $p2[6])=explode("\t",trim($b));
+        $s1 = $s2 = 0;
+        foreach ($p1 as $pen) $s1 += $pen;
+        foreach ($p2 as $pen) $s2 += $pen;
+        return ($s1 > $s2) ? -1 : 1;
+    }
+    function cmp_sum_asc($a,$b) { return cmp_sum_desc($b,$a); }
+    function cmp_sum_desc($a,$b) {
+        list(,,,,,,,,,,,,,,,,,,,,,$i1[0],$i1[1],$i1[2],$i1[3],$i1[4],$i1[5],
+        $i1[6],$i1[7],$i1[8],$i1[9])=explode("\t",trim($a));
+        list(,,,,,,,,,,,,,,,,,,,,,$i2[0],$i2[1],$i2[2],$i2[3],$i2[4],$i2[5],
+        $i2[6],$i2[7],$i2[8],$i2[9])=explode("\t",trim($b));
+        $s1 = $s2 = 0;
+        foreach ($i1 as $item) { $s1 += $item; }
+        foreach ($i2 as $item) $s2 += $item;
+        return ($s1 > $s2) ? -1 : 1;
+    }
+
+?>
Index: /irpg/trunk/config.php
===================================================================
--- /irpg/trunk/config.php	(revision 1449)
+++ /irpg/trunk/config.php	(revision 1449)
@@ -0,0 +1,53 @@
+<?php
+
+$admin_email="tereutes@nainwak.com";
+$admin_nick="DT";
+
+// nickname of your bot
+$irpg_bot="Schlavbeuk";
+
+// your game's server
+$irpg_network="irc.netrusk.net";
+
+// your game's channel
+$irpg_chan="#zzz";
+
+// full or relative pathname to the DBs:
+
+// character database
+$irpg_db="/home/nainwak/zZzZ/bot/irpg.db";
+
+// item database
+$irpg_itemdb="/home/nainwak/zZzZ/bot/mapitems.db";
+
+// time modifiers file
+$irpg_mod="/home/nainwak/zZzZ/bot/modifiers.txt";
+
+// active quest info file
+$irpg_qfile="/home/nainwak/zZzZ/bot/questinfo.txt";
+
+// image to use for the top logo
+$irpg_logo="idlerpg.png";
+
+// directory in which your site is located from the root directory. my site
+// is http://jotun.ultrazone.org/g7/, so it's "/g7/"
+$BASEURL="/";
+
+// width-wise dimension of your map file
+$mapx = 500;
+
+// length-wise dimension of your map file
+$mapy = 500;
+
+// size of crosses for players and items on world map
+$crosssize = 3;
+
+// language
+$language = 'fr_FR';
+
+// ordre des objets   
+$item_order = Array ('gloves', 'weapon', 'tunic', 'leggings', 'shield', 'helm', 'boots', 'charm', 'ring', 'amulet');
+
+// format de la date voir http://fr.php.net/manual/fr/function.strftime.php
+$dateformat = "%a %e %b %Y %T"
+?>
Index: /irpg/trunk/contact.php
===================================================================
--- /irpg/trunk/contact.php	(revision 1449)
+++ /irpg/trunk/contact.php	(revision 1449)
@@ -0,0 +1,47 @@
+<?php
+
+include("config.php");
+
+$irpg_page_title = "Contact";
+
+include("header.php");
+
+    echo "<h1>Contact</h1>";
+    if ($_POST['from'] && $_POST['text']) {
+        mail($admin_email,"IRPG: ".$_POST['from'],
+             "Name: ".$_POST['name']."\nE-mail: ".$_POST['from']."\n\n".
+             $_POST['text'],"From: ".$_POST['from']."\r\n");
+        echo('      <blockquote>Merci pour le message.</blockquote>');
+    }
+    else {
+        echo('
+        <form method="post" action="contact.php">
+          <table border="0">
+            <tr>
+              <th align="left"><label for="from">Adresse email</label>:</th>
+              <td align="right">
+                <input type="text" size="20" maxlength="50" name="from" id="from" />
+              </td>
+            </tr>
+            <tr>
+              <th align="left"><label for="name">Nom</label>:</th>
+              <td align="right">
+                <input type="text" size="20" maxlength="50" name="name" id="name" />
+              </td>
+            </tr>
+            <tr>
+              <td colspan="2">
+                <textarea name="text" rows="6" cols="44"></textarea><br />
+              </td>
+            </tr>
+            <tr>
+              <td colspan="2" align="right">
+                <input type="submit" value="Envoyer" />
+              </td>
+            </tr>
+          </table>
+        </form>
+');
+    }
+    include("footer.php");
+?>
Index: /irpg/trunk/db.php
===================================================================
--- /irpg/trunk/db.php	(revision 1449)
+++ /irpg/trunk/db.php	(revision 1449)
@@ -0,0 +1,255 @@
+<?php
+
+    include("config.php");
+    
+    $irpg_page_title = "Liste des joueurs";
+    
+    include("header.php");
+    
+    include("commonfunctions.php");
+
+    $file = file($irpg_db);
+    unset($file[0]);
+    if (!$_GET['sort'] ||
+        (($_GET['sort'] != "cmp_level_asc") &&
+        ($_GET['sort'] != "cmp_level_desc") &&
+        ($_GET['sort'] != "cmp_isadmin_asc") &&
+        ($_GET['sort'] != "cmp_isadmin_desc") &&
+        ($_GET['sort'] != "cmp_alignment_asc") &&
+        ($_GET['sort'] != "cmp_alignment_desc") &&
+        ($_GET['sort'] != "cmp_ttl_asc") &&
+        ($_GET['sort'] != "cmp_ttl_desc") &&
+        ($_GET['sort'] != "cmp_pen_asc") &&
+        ($_GET['sort'] != "cmp_pen_desc") &&
+        ($_GET['sort'] != "cmp_lastlogin_asc") &&
+        ($_GET['sort'] != "cmp_lastlogin_desc") &&
+        ($_GET['sort'] != "cmp_created_asc") &&
+        ($_GET['sort'] != "cmp_created_desc") &&
+        ($_GET['sort'] != "cmp_idled_asc") &&
+        ($_GET['sort'] != "cmp_idled_desc") &&
+        ($_GET['sort'] != "cmp_user_asc") &&
+        ($_GET['sort'] != "cmp_user_desc") &&
+        ($_GET['sort'] != "cmp_online_asc") &&
+        ($_GET['sort'] != "cmp_online_desc") &&
+        ($_GET['sort'] != "cmp_uhost_asc") &&
+        ($_GET['sort'] != "cmp_uhost_desc") &&
+        ($_GET['sort'] != "cmp_sum_asc") &&
+        ($_GET['sort'] != "cmp_sum_desc"))) $_GET['sort'] = "cmp_level_desc";
+    usort($file,$_GET['sort']);
+?>
+    <table border=1 cellpadding=2 cellspacing=2 cols="32" rows="<?php print count($file); ?>">
+      <tr>
+        <th NOWRAP>
+          Pseudo
+          (<a href="db.php?sort=cmp_user_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_user_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Niveau
+          (<a href="db.php?sort=cmp_level_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_level_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Admin
+          (<a href="db.php?sort=cmp_isadmin_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_isadmin_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>Profession</th>
+        <th NOWRAP>
+          Prochain Niv.
+          (<a href="db.php?sort=cmp_ttl_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_ttl_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Nick!User@Host
+          (<a href="db.php?sort=cmp_uhost_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_uhost_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          En ligne
+          (<a href="db.php?sort=cmp_online_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_online_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Temps d'inactiv&eacute; total
+          (<a href="db.php?sort=cmp_idled_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_idled_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>X Pos</th>
+        <th NOWRAP>Y Pos</th>
+        <th NOWRAP>P&eacute;n. Mesg</th>
+        <th NOWRAP>P&eacute;n. Nick</th>
+        <th NOWRAP>P&eacute;n. Part</th>
+        <th NOWRAP>P&eacute;n. Kick</th>
+        <th NOWRAP>P&eacute;n. Quit</th>
+        <th NOWRAP>P&eacute;n. Qu&ecirc;te</th>
+        <th NOWRAP>P&eacute;n. Logout</th>
+        <th NOWRAP>
+          Total Pen.
+          (<a href="db.php?sort=cmp_pen_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_pen_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Date Cr&eacute;ation
+          (<a href="db.php?sort=cmp_created_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_created_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Derni&egrave;re connex.
+          (<a href="db.php?sort=cmp_lastlogin_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_lastlogin_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>Arme bourrin</th>
+        <th NOWRAP>Arme sniper</th>
+        <th NOWRAP>Rune Vie</th>
+        <th NOWRAP>Rune For</th>
+        <th NOWRAP>Rune Pre</th>
+        <th NOWRAP>Rune Int</th>
+        <th NOWRAP>V&eacute;hicule</th>
+        <th NOWRAP>Bouffe</th>
+        <th NOWRAP>Inutile</th>
+        <th NOWRAP>Jouet</th>
+        <th NOWRAP>
+          Total
+          (<a href="db.php?sort=cmp_sum_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_sum_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+        <th NOWRAP>
+          Cot&eacute;
+          (<a href="db.php?sort=cmp_alignment_asc">
+             <img src="up.png" border="0">
+           </a>
+           /
+          <a href="db.php?sort=cmp_alignment_desc">
+             <img src="down.png" border="0">
+          </a>)
+        </th>
+      </tr>
+<?php
+    foreach ($file as $line) {
+      list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled,$x,$y,
+           $pen['mesg'],
+           $pen['nick'],
+           $pen['part'],
+           $pen['kick'],
+           $pen['quit'],
+           $pen['quest'],
+           $pen['logout'],
+           $created,
+           $lastlogin,
+           $item['amulet'],
+           $item['charm'],
+           $item['helm'],
+           $item['boots'],
+           $item['gloves'],
+           $item['ring'],
+           $item['leggings'],
+           $item['shield'],
+           $item['tunic'],
+           $item['weapon'],
+           $alignment,
+          ) = explode("\t",trim($line));
+      $class = str_replace("<","&lt;",$class);
+      $user = str_replace("<","&lt;",$user);
+      $class = str_replace(">","&gt;",$class);
+      $user = str_replace(">","&gt;",$user);
+      $sum = 0;
+      foreach ($item as $k => $v) $sum += $v;
+      $pentot = 0;
+      foreach ($pen as $k => $v) $pentot += $v;
+      echo "      <tr>\n".
+           "        <td nowrap>$user</td>\n".
+           "        <td>$level</td>\n".
+           "        <td>".($isadmin?"Oui":"Non")."</td>\n".
+           "        <td nowrap>$class</td>\n".
+           "        <td nowrap>".duration($secs)."</td>\n".
+           "        <td nowrap>$uhost</td>\n".
+           "        <td>".(($online == 1) ? "Oui" : "Non")."</td>\n".
+           "        <td nowrap>".duration($idled)."</td>\n".
+           "        <td nowrap>$x</td>\n".
+           "        <td nowrap>$y</td>\n".
+           "        <td nowrap>".duration($pen['mesg'])."</td>\n".
+           "        <td nowrap>".duration($pen['nick'])."</td>\n".
+           "        <td nowrap>".duration($pen['part'])."</td>\n".
+           "        <td nowrap>".duration($pen['kick'])."</td>\n".
+           "        <td nowrap>".duration($pen['quit'])."</td>\n".
+           "        <td nowrap>".duration($pen['quest'])."</td>\n".
+           "        <td nowrap>".duration($pen['logout'])."</td>\n".
+           "        <td nowrap>".duration($pentot)."</td>\n".
+           "        <td nowrap>".strftime($dateformat,$created)."</td>\n".
+           "        <td nowrap>".strftime($dateformat,$lastlogin)."</td>\n".
+           "        <td>".$item['gloves']."</td>\n".
+           "        <td>".$item['weapon']."</td>\n".
+           "        <td>".$item['tunic']."</td>\n".
+           "        <td>".$item['leggings']."</td>\n".
+           "        <td>".$item['shield']."</td>\n".
+           "        <td>".$item['helm']."</td>\n".
+           "        <td>".$item['boots']."</td>\n".
+           "        <td>".$item['charm']."</td>\n".
+           "        <td>".$item['ring']."</td>\n".
+           "        <td>".$item['amulet']."</td>\n".
+           "        <td>$sum</td>\n".
+           "        <td>".($alignment=='e'?"Sadique":($alignment=='n'?"Nain-d&eacute;ci":"Brave"))."</td>\n".
+           "      </tr>\n";
+    }
+
+    echo('
+    </table>
+    ');
+    include("footer.php");
+?>
Index: /irpg/trunk/dump.php
===================================================================
--- /irpg/trunk/dump.php	(revision 1449)
+++ /irpg/trunk/dump.php	(revision 1449)
@@ -0,0 +1,118 @@
+<?php
+    // this file has been edited to produce its output in the same format as
+    // it has with previous versions, despite the new database format. coders
+    // should use the new xml.php to glean player info, which is much more
+    // suited to db changes.
+    header('Content-Type: text/plain');
+    include("commonfunctions.php");
+    include("config.php");
+    $file = file($irpg_db);
+    $header = explode("\t",$file[0]);
+    unset($header[1]); // password
+    unset($header[2]); // isadmin
+    unset($header[6]); // nickname
+    unset($header[10]); // x pos
+    unset($header[11]); // y pos
+    unset($header[31]); // alignment
+    echo join("\t",$header)."\n";
+    unset($file[0]);
+    /* specific character requested */
+    if ($_GET['player']) {
+        foreach ($file as $line) {
+            list($user) = explode("\t",trim($line));
+            if ($user == $_GET['player']) {
+                list($user,,,
+                     $level,$class,$secs,,$uhost,$online,$idled,,,
+                     $pen['mesg'],
+                     $pen['nick'],
+                     $pen['part'],
+                     $pen['kick'],
+                     $pen['quit'],
+                     $pen['quest'],
+                     $pen['logout'],
+                     $created,
+                     $lastlogin,
+                     $item['amulet'],
+                     $item['charm'],
+                     $item['helm'],
+                     $item['boots'],
+                     $item['gloves'],
+                     $item['ring'],
+                     $item['leggings'],
+                     $item['shield'],
+                     $item['tunic'],
+                     $item['weapon'],
+                    ) = explode("\t",trim($line));
+                echo join("\t",
+                          array($user,$level,$class,$secs,$uhost,$online,$idled,
+                                $pen['mesg'],
+                                $pen['nick'],
+                                $pen['part'],
+                                $pen['kick'],
+                                $pen['quit'],
+                                $pen['quest'],
+                                $pen['logout'],
+                                $created,
+                                $lastlogin,
+                                $item['amulet'],
+                                $item['charm'],
+                                $item['helm'],
+                                $item['boots'],
+                                $item['gloves'],
+                                $item['ring'],
+                                $item['leggings'],
+                                $item['shield'],
+                                $item['tunic'],
+                                $item['weapon']))."\n";
+            }
+        }
+        exit(0);
+    }
+    /* no specific character requested; list all */
+    usort($file,"cmp_level_desc");
+    foreach ($file as $line) {
+        list($user,,,
+             $level,$class,$secs,,$uhost,$online,$idled,,,
+             $pen['mesg'],
+             $pen['nick'],
+             $pen['part'],
+             $pen['kick'],
+             $pen['quit'],
+             $pen['quest'],
+             $pen['logout'],
+             $created,
+             $lastlogin,
+             $item['amulet'],
+             $item['charm'],
+             $item['helm'],
+             $item['boots'],
+             $item['gloves'],
+             $item['ring'],
+             $item['leggings'],
+             $item['shield'],
+             $item['tunic'],
+             $item['weapon'],
+            ) = explode("\t",trim($line));
+        echo join("\t",
+             array($user,$level,$class,$secs,$uhost,$online,$idled,
+             $pen['mesg'],
+             $pen['nick'],
+             $pen['part'],
+             $pen['kick'],
+             $pen['quit'],
+             $pen['quest'],
+             $pen['logout'],
+             $created,
+             $lastlogin,
+             $item['amulet'],
+             $item['charm'],
+             $item['helm'],
+             $item['boots'],
+             $item['gloves'],
+             $item['ring'],
+             $item['leggings'],
+             $item['shield'],
+             $item['tunic'],
+             $item['weapon']))."\n";
+    }
+?>
Index: /irpg/trunk/footer.php
===================================================================
--- /irpg/trunk/footer.php	(revision 1449)
+++ /irpg/trunk/footer.php	(revision 1449)
@@ -0,0 +1,37 @@
+    </div>
+    <div class="footer">
+        <p class="small">
+            Des questions ? Commentaires ? Suggestions ? Bugs ? 
+            Contactez <a href="contact.php"><?php print $admin_email?></a> ou <?php print $admin_nick?>@IRC.
+            Pour les photos de filles nues, voyez avec <a href="mailto:jecht@nainwak.com">jechtounet</a>.
+<?php
+            $hits = file("hits.db");
+            $fp = fopen("hits.db", "w");
+            $thispage = explode("/",$_SERVER['PHP_SELF']);
+            $thispage = array_pop($thispage);
+            if ($fp == false) {
+                echo "Error: could not open file hits.db.";
+            }
+      $found = 0;
+            foreach ($hits as $line) {
+                list($page,$numhits,$date) = explode("\t",trim($line));
+                if ($page == $thispage) {
+                    ++$numhits;
+                    echo "            Page visit&eacute;e $numhits fois depuis le $date";
+                    $found = 1;
+                }
+                if ($fp) {
+                    fwrite($fp,"$page\t$numhits\t$date\n");
+                }
+            }
+            if (!$found && $fp) {
+                echo "            Page visit&eacute;e une fois depuis le ".strftime($dateformat,time());
+                fwrite($fp,$thispage."\t1\t".strftime($dateformat,time())."\n");
+            }
+            fclose($fp);
+?>
+
+        </p>
+    </div>
+  </body>
+</html>
Index: /irpg/trunk/g7.css
===================================================================
--- /irpg/trunk/g7.css	(revision 1449)
+++ /irpg/trunk/g7.css	(revision 1449)
@@ -0,0 +1,111 @@
+body { 
+    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; 
+    background-color: #FFFFF0;
+    color: black;
+    margin: 10px;
+    text-align: justify;
+}
+
+h1 { margin-bottom: 0px; margin-top: 0px; }
+h2 { margin-bottom: 0px; }
+
+p.small { margin: 0px; font-size: smaller; }
+
+a { text-decoration: none; color: #C69500; }
+a:hover { text-decoration: underline; color: black; }
+
+div.head {
+   border: 1px solid #c0c0c0;
+   text-align: left;
+   width: 100%;
+   margin-bottom: 10px;
+   background: #FFFFFF;
+}
+
+div.menu {
+   width: 120px;
+   position: relative;
+   float: left;
+   border: 1px solid #c0c0c0;
+   background: #FFFFFF;
+}
+div#menu a.home { color: #000000; background: #c0c0c0; border: 1px solid #000000; }
+div#menu a.home:hover { background: #c0c0c0; border: 1px solid #000000; }
+div#menu a {
+   text-align: center;
+   width: 118px;
+   margin: 0px;
+   display: block;
+   border: 1px solid #FFFFFF
+}
+
+div#menu a:hover { border: 1px solid #000000; background: #c0c0c0; text-decoration: none; }
+
+div.content {
+   border: 1px solid #c0c0c0; 
+   margin-left: 130px;
+   margin-top: 0px;
+   padding: 10px;
+   background: #FFFFFF;
+}
+
+div.footer {
+   border: 1px solid #c0c0c0; 
+   margin-left: 130px;
+   margin-top: 10px;
+   padding: 10px;
+   background: #FFFFFF;
+}
+
+
+table.uniques {
+   border: 1px solid #c0c0c0;
+   padding: 5px;
+   text-align: left;
+}
+table.uniques td {
+   padding-left: 10px;
+}
+   
+table.penalty {
+   border: 1px solid #c0c0c0;
+   padding: 5px;
+   text-align: left;
+}
+table.penalty th {
+   text-align: right;
+}
+table.penalty td {
+
+}
+
+/* Styles for the userlist */
+li.online { font-weight: bold; }
+li.offline { color: #c0c0c0; }
+a.offline { color: #707070; }
+#map {
+    width: 500px;
+    height: 500px;
+    background-image: url(newmap.png);
+}
+
+
+table.forum {
+    border: 1px solid #c0c0c0;
+    table-layout: fixed;
+    overflow: auto;
+}
+
+table.forum td,tr,caption,thead,tfoot,th {
+    padding-left: 10px;
+    padding-right: 10px;
+}
+.tdblue { background-color: #ffffdf; }
+.tdgray { background-color: #eeeee0; }
+.tdred {
+    border: 1px solid red;
+    background-color: #FFCCCC;
+}
+.smallest {
+    font-size: 11px;
+}
Index: /irpg/trunk/header.php
===================================================================
--- /irpg/trunk/header.php	(revision 1449)
+++ /irpg/trunk/header.php	(revision 1449)
@@ -0,0 +1,46 @@
+﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
+        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+
+<html>
+  <head>
+    <title><?echo $irpg_chan;?> Idle RPG: <?echo $irpg_page_title;?></title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <link rel="stylesheet" type="text/css" href="g7.css" />
+  </head>
+  <body>
+
+    <!-- Idle RPG Logo -->
+
+    <div class="head">
+<?php
+    echo('        <img src="'. $irpg_logo .'" alt="'. $irpg_chan .' Idle RPG" title="'. $irpg_chan .' Idle RPG" width="338" height="115" />');
+?>
+    </div>
+
+    <div id="menu" class="menu">
+
+<?php
+    $topbarurl = array(
+        'Le jeu' => $BASEURL . 'index.php',
+        'Les joueurs' => $BASEURL . 'players.php',
+        'La carte' => $BASEURL . 'worldmap.php',
+        'Les qu&ecirc;tes' => $BASEURL . 'quest.php',
+        'Contact' => $BASEURL . 'contact.php',
+        'D\'autres IRPG' => 'http://idlerpg.net/others.php',
+        'Code Source' => 'http://idlerpg.net/source.php',
+        'Source du site' => 'http://idlerpg.net/sitesource.php',
+        'Forum' => 'http://idlerpg.net/forum.php'
+    );
+
+    foreach ($topbarurl as $key => $value) {
+        if ($topbarurl[$key] ==  $_SERVER['PHP_SELF']) {
+            echo "        <a class=\"home\" href=\"$value\">$key</a>\n";
+        }
+        else {
+            echo "        <a href=\"$value\">$key</a>\n";
+        }
+    }
+?>
+    </div>
+
+    <div class="content">
Index: /irpg/trunk/hits.db
===================================================================
--- /irpg/trunk/hits.db	(revision 1449)
+++ /irpg/trunk/hits.db	(revision 1449)
@@ -0,0 +1,17 @@
+contact.php	4043	Apr 22, 2003
+db.php	6058	Jun 13, 2003
+index.php	67338	Apr 22, 2003
+playerview.php	144703	Apr 5, 2004
+players.php	52171	Apr 5, 2004
+source.php	13036	Apr 5, 2004
+sitesource.php	7956	Apr 5, 2004
+others.php	13649	Apr 5, 2004
+donate.php	1333	Apr 5, 2004
+donated.php	4	Apr 6, 2004
+forum.php	1799	Jul 13, 2004
+quest.php	349	Jul 13, 2004
+worldmap.php	327	Jul 13, 2004
+1	Jul 15, 2004	
+g7.css	1	Jul 15, 2004
+idlerpg.png	1	Jul 15, 2004
+1	Jan 10, 2006	
Index: /irpg/trunk/idlerpg-adv.txt
===================================================================
--- /irpg/trunk/idlerpg-adv.txt	(revision 1449)
+++ /irpg/trunk/idlerpg-adv.txt	(revision 1449)
@@ -0,0 +1,142 @@
+#!/usr/bin/perl -w
+# idlerpg-adv (11-22-2003) by daxxar (http://mental.mine.nu)
+# Usage: ./idlerpg-adv.pl [playernames]
+#
+# Call this script from the command line, or your login profile.
+use strict;
+use LWP::Simple;
+
+# Use cookies:
+# %user - username, %class - class, %level - level,
+# %next - time to next level, %status - online status,
+# %uhost - nick!ident@host, %ca - created at,
+# %llo - last logged on, %ti - total idletime,
+# %items - list of items, %penalties - list of penalties (special; multiline)
+#
+# Each comma-separated element is printed with a newline at the end :) 
+
+my @string = (
+             '[User] %user', '[Class] %class', '[Level] %level', '[Next level] %next',
+             '[Status] %status', '[User@host] %uhost', '[Created at] %ca',
+             '[Last logged on] %llo', '[Total idle] %ti', '[Items] %items',
+	     '[Penalties] %penalties'
+             );
+
+### No need to change below ###
+# For printing things in a columnized view
+# print_col(\@list_of_entries, \@value_of_entries, $number_per_line)
+sub make_col {
+   my $entryname = shift;
+   my $entryvalue = shift;
+   my $count = shift;
+   my @len;
+   my $ret;
+   # Find maximum length for each of the $count columns
+   for my $x (0 .. $#{$entryvalue}) {
+      my $col = $x % $count;
+      if (!defined($len[$col]) || $len[$col] < length($entryvalue->[$x] . $entryname->[$x])) {
+         $len[$col] = length("$entryvalue->[$x]"."$entryname->[$x]");
+      }
+   }
+   for my $t (0 .. $#$entryvalue) {
+      if (!($t % $count)) { $ret .= "\n   "; }
+      $ret .= "$entryname->[$t]\($entryvalue->[$t]\)"; 
+      $ret .= ' ' x ($len[$t % $count] - length($entryname->[$t] . $entryvalue->[$t]) + 1);
+   }
+   return $ret;
+}
+sub time_to {
+   my @timeunits = ('yr', 'month', 'week', 'day', 'hr', 'min', 'sec');
+   my @timecalc = (31104000, 2592000, 604800, 86400, 3600, 60, 1);
+   my $seconds = shift; my $output;
+   if ($seconds == 0) { return "0 seconds"; }
+   for my $x (0 .. $#timecalc) {
+     my $y = int($seconds / $timecalc[$x]);
+     if ($y != 0 && $seconds != 0 && $seconds >= $timecalc[$x]) {
+        $seconds = ($seconds % $timecalc[$x]);
+        $output .= "$y $timeunits[$x]";
+        $output .= 's' unless $y == 1;
+	if ($seconds == 0) { last; }
+        $output .= ', ' if $x < $#timecalc - 1 && ($seconds % $timecalc[$x+1]) && $seconds != 0;
+        $output .= ' and ' if !($seconds % $timecalc[$x+1]);
+     }
+  }
+  return $output;
+}
+sub time_from {
+   my $seconds = shift;
+   my ($sec, $min, $hr, $day, $mo, $yr, $wday) = localtime($seconds);
+   $mo = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Oct', 'Sep', 'Nov', 'Dec')[$mo];
+   $wday = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')[$wday];
+   $yr += 1900;
+   if ($hr < 10) { $hr = "0$hr"; }
+   if ($min < 10) { $min = "0$min"; }
+   if ($sec < 10) { $sec = "0$sec"; }
+   if ($day < 10) { $day .= ' '; }
+   return "$wday $mo $day $hr:$min:$sec $yr";
+}
+die "Usage: $0 <playernames>\n" .
+    "Example: $0 daxxar cyb\n" if @ARGV == 0;
+
+start:
+my $username = shift(@ARGV);
+my $page = get "http://jotun.ultrazone.org/g7/dump.php?player=$username";
+
+# Only line is commented if there is no such user 
+if ($page =~ /^#[^\n]+$/) { print "$username: no such user\n"; exit 1; }
+($page) = ($page =~ /\n([^#].*)/); # Remove the comment
+
+# @ent = entries on page, \t separated.
+my @ent = split(/\t/, $page);
+
+# Assign each tab-separated entry to its hash-key 
+my %values = (
+   'user'     => $ent[0], 'level'  => $ent[1],
+   'class'    => $ent[2], 'next'   => $ent[3],
+   'host'     => $ent[4], 'status' => $ent[5],
+   'totalidle'=> $ent[6], 'created'=> $ent[14],
+   'lastlog'  => $ent[15],
+   'penaltynames' => [ qw(msg nick part kick quit quest logout) ],
+   'penaltytimes' => [ @ent[7 .. 13] ],
+   'itemnames' => [ qw(amulet charm helm boots gloves ring leggings shield tunic weapon sum) ],
+   'itemlvls' => [ @ent[16 .. 25] ]
+);
+$values{'next'}      = time_to  ($values{'next'}); 
+$values{'totalidle'} = time_to  ($values{'totalidle'});
+$values{'lastlog'}   = time_from($values{'lastlog'});
+$values{'created'}   = time_from($values{'created'});
+if ($values{'status'}) {$values{'status'} = 'Online'}
+else {$values{'status'} = 'Offline'}
+
+foreach my $str (@{[ @string ]}) {
+   $str =~ s/%user/$values{'user'}/g;
+   $str =~ s/%class/$values{'class'}/g;
+   $str =~ s/%level/$values{'level'}/g;
+   $str =~ s/%next/$values{'next'}/g;
+   $str =~ s/%status/$values{'status'}/g;
+   $str =~ s/%uhost/$values{'host'}/g;
+   $str =~ s/%ca/$values{'created'}/g;
+   $str =~ s/%llo/$values{'lastlog'}/g;
+   $str =~ s/%ti/$values{'totalidle'}/g;
+   if ($str =~ /%penalties/) {
+      my @penaltyname = qw(msg nick part kick quit quest logout);
+      my @penaltytime = @ent[7 .. 13];
+      for my $t (0 .. $#penaltytime) { $penaltytime[$t] = time_to($penaltytime[$t]); }
+      my $cols = make_col(\@penaltyname, \@penaltytime, 3);
+      $str =~ s/%penalties/$cols/g;
+   }
+   if ($str =~ /%items/) {
+      my @itemname = qw(amulet charm helm boots gloves ring leggings shield tunic weapon sum);
+      my @itemlvls = @ent[16 .. 25];
+      # Yay, lets get a nice sum(sum) in output! :D
+      my $sum; map($sum += $_, @itemlvls);
+      my $cols = make_col(\@itemname, [ @itemlvls, $sum ], 3);
+      $str =~ s/%items/$cols/g;
+   }
+   $str =~ s///g;
+   $str =~ s///g;
+   print "$str\n";
+}
+
+print "\n" if @ARGV != 0;
+goto start if @ARGV != 0;
Index: /irpg/trunk/index.php
===================================================================
--- /irpg/trunk/index.php	(revision 1449)
+++ /irpg/trunk/index.php	(revision 1449)
@@ -0,0 +1,552 @@
+<?php
+    include("config.php");
+    $irpg_page_title = "Informations sur le jeu";
+    include("header.php");
+?>
+    <h1>IRPG</h1>
+    
+    <p>Le Idle RPG (Jeux de r&ocirc;le o&ugrave; l'on reste inactif) est un  JdR
+    ou les   joueurs ne  font <b>RIEN</b>.  En plus  de gagner  des niveaux, ils
+    peuvent trouver   des objets,  combattre  les  uns  contres  les  autres  et
+    tout cela sans  rien faire :  le bot se  charge de tout  ! En fait,  si vous
+    tentez  de faire  quelque chose  cela vous  p&eacute;nalisera... on  vous  a
+    demand&eacute;   d'&ecirc;tre   I-NAC-TIF et d'admirer (ou   pas).  Il   n'y
+    a    pas   de professions  pr&eacute;d&eacute;finies   de  personnage.  Vous
+    pouvez  appeler  votre personnage  comme bon  vous semble  et lui  donner la
+    profession de  votre choix.</p>
+
+    <h2>Lieu</h2>
+
+    <p>Le Idle RPG est jouable sur IRC, sur <a href="http://www.netrusk.net/">Le
+    reseau  NetRusk</a> dans  le salon  #zzz. </p>
+    
+
+    <h2>Enregistrement</h2>
+    
+      <p>Pour s'enregistrer, c'est simple :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> REGISTER &lt;pseudo&gt; &lt;mot de passe&gt;
+          &lt;profession&gt;
+        </code>
+      
+      <p>O&ugrave; :
+      <ul>
+      	<li>'pseudo' peut atteindre 16  caract&egrave;res,</li>
+      	<li>'mot de passe' : 8</li>
+      	<li>et votre 'profession' peut monter jusqu'&agrave; 30.</li>
+      </ul>
+      </p>
+    
+
+    <h2>Connexion</h2>
+    
+      <p>Pour se connecter :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> LOGIN &lt;pseudo&gt; &lt;mot de passe&gt;
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+    
+
+    <h2>D&eacute;connexion</h2>
+    
+      <p>Pour se d&eacute;connecter :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> LOGOUT
+        </code>
+      
+      <p>Il     s'agit     d'une      commande     p20     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+    
+
+    <h2>Changer de mot de passe</h2>
+    
+      <p>Pour changer de mot de passe :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> NEWPASS &lt;nouveau mot de passe&gt;
+        </code>
+      
+      <p>Il     s'agit     d'une      commande     p20     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+      
+      <p>Si   vous   avez  oubli&eacute;   votre   mot   de   passe,    veuillez
+      utiliser   la commande  <a   href="#info">INFO</a>  pour trouver un  admin
+      connect&eacute; qui pourra vous aider.</p>
+    
+
+    <h2>Supprimer son compte</h2>
+    
+      <p>Pour supprimer son compte (une fois connect&eacute;) :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> REMOVEME
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>). :o)</p>
+    
+
+    <h2>Changer de cot&eacute;</h2>
+    
+      <p>Pour changer de cot&eacute; :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> ALIGN &lt;good|neutral|evil&gt;
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+      
+      <p>'Good'  correspond   aux braves,   'neutral'  aux  nain-d&eacute;ci  et
+      'evil' aux sadiques. Votre cot&eacute;  va  affecter certains  aspects  du
+      jeu. 
+      <ul>
+      
+      	<li>  Ainsi  les  braves ont  10% suppl&eacute;mentaire  &agrave;   leur
+      	&eacute;quipement  lors  des   combats  et   1/12  de    chance   chaque
+      	jour   qu'avec    un      ami   brave      ils   re&ccedil;oivent     la
+      	lumi&egrave;re    de   Schlavbeuk    sur     eux.     Ce      qui    les
+      	acc&eacute;l&eacute;rera    de   5-12%   vers   le prochain niveau.</li>
+      	<li>  Les sadiques   ont un  malus  de  10% sur   leur &eacute;quipement
+      	(jamais oublier  dans  les grand moment    de  solitude) mais    ont 1/8
+      	de chance chaque jour de : 
+      	<ul>
+        	<li>essayer de voler une arme &agrave; un brave (qu'ils ne peuvent que
+        	ha&iuml;r),</li>
+        	
+        	<li>&ecirc;tre   oublier par   Schlavbeuk (1   &agrave; 5%   du temps
+        	avant le prochain niveau). Apr&egrave;s tout on sait tous que le crime
+        	ne  paye pas !</li>
+        	
+      	</ul> </li>
+      	<li>Les nain- d&eacute;cis n'ont rien de chang&eacute; (mais peuvent  se
+      faire taper) et tous les joueurs commencent nain- d&eacute;ci.</li>
+      </ul>
+      
+      De   plus,    les   braves    ont     1/50    de chance  de   faire     un
+      <a  href="#critstrike">coup critique</a> et les sadiques 1/20.</p>
+    
+    
+    <a name="info"></a><h2>Obtenir des informations sur le bot</h2>
+    
+      <p>Pour obtenir quelques informations basiques :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> INFO
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+      
+      <p>Cette  commande  vous  informe  entre autre  sur  quel  serveur  il est
+      connect&eacute; et le nom des admins en ligne.</p>
+    
+    
+
+    <h2>Les niveaux</h2>
+    
+      <p>Pour  gagner  des  niveaux, il   suffit  d'&ecirc;tre   connect&eacute;
+      et  de  "glander". le    temps  entre   les  niveaux    est calcul&eacute;
+      &agrave; partir du  niveau  de votre personnage selon la formule  suivante
+      :</p>
+      
+        60*(1.16^VOTRE_NIVEAU)
+      
+      <p>Ou ^ repr&eacute;sente l'op&eacute;rateur exponentiel.</p>
+      
+      <p>Les     tr&egrave;s     hauts     niveaux     sont      calcul&eacute;s
+      diff&eacute;remment. Ainsi  les personnages  de niveau    sup&eacute;rieur
+      &agrave;  60  gagnent leur  prochain niveau suivant la formule :
+      
+        (temps pour arriver &agrave; 60) + ((1 jour) * (niveau - 60))
+      
+      <p>La  m&eacute;thode  exponentielle  fait   que  les  niveaux prendraient
+      beaucoup trop de temps &agrave; &ecirc;tre atteint.</p>
+    
+
+    <h2>V&eacute;rifier les qu&ecirc;tes actives</h2>
+    
+      <p>Pour conna&icirc;tre   les qu&ecirc;tes   actives, les   joueurs et  le
+      temps restant :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> QUEST
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+    
+
+    <h2>V&eacute;rifier son statut "En ligne"</h2>
+    
+      <p>Pour v&eacute;rifier que vous &ecirc;tes connect&eacute; :</p>
+      
+        <code>
+          /msg <?echo $irpg_bot;?> WHOAMI
+        </code>
+      
+      <p>Il     s'agit      d'une     commande      p0     (voir      les     <a
+      href="#penalties">p&eacute;nalit&eacute;s</a>).</p>
+    
+
+    <a name="penalties"></a><h2>P&eacute;nalit&eacute;s</h2>
+
+    
+      <p>Si vous  faites quoi   que ce  soit sur   le salon  (comme : partir  du
+      salon, quitter IRC, parler, changer de pseudo ou faire des notices sur  le
+      salon)    vous   serez     p&eacute;nalis&eacute;.  Il     s'agit    d'une
+      dur&eacute; en seconde qui va   s'ajouter  au temps  qu'il vous    fallait
+      attendre avant le prochain niveau.   Il est  bas&eacute; sur votre  niveau
+      et  les formules sont les suivantes :</p>
+
+      <table id="penalty" class="penalty">
+        <tr>
+          <th>Changer de pseudo</th>
+          <td>30*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Partir</th>
+          <td>200*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Quitter IRC</th>
+          <td>20*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Utiliser la commande LOGOUT</th>
+          <td>20*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Etre "kick&eacute;"</th>
+          <td>250*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Parler</th>
+          <td>[taille du message]*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+        <tr>
+          <th>Faire un notice</th>
+          <td>[taille du message]*(1.14^(VOTRE_NIVEAU))</td>
+        </tr>
+      </table>
+      <br />
+      
+      <p>Ainsi  un  personnage  de  niveau  25  changeant  son  pseudo  se verra
+      p&eacute;nalis&eacute; de 20*(1.14^25)=793 secondes.</p>
+      
+      <p>L'abr&eacute;viation  pour   les p&eacute;nalit&eacute;s   et  de  type
+      p[num]. Ainsi  changer de  pseudo est  un p30,  partir du  salon un  p200,
+      etc...</p>
+    
+
+    <h2>Objets</h2>
+    
+      <p>A chaque fois  que vous gagnez  un niveau, vous  trouvez un objet.   La
+      valeur de celui-ci  peut monter jusqu'&agrave;  1.5*VOTRE_NIVEAU (&agrave;
+      moins que  vous tombiez sur  <a href="#uniqueitems">objet  unique</a>). Il
+      y a  10 sortes  d'objets : 
+      <ul>
+      	<li>les armes de bourrin,</li>
+      	<li>les armes de sniper,</li>
+      	<li>les runes de vie,</li>
+      	<li>les runes de force,</li>
+      	<li>les runes de pr&eacute;cision,</li>
+      	<li>les runes d'intelligence,</li>
+      	<li>les v&eacute;hicules,</li>
+      	<li>les  bouffes,</li>
+      	<li>les inutiles et</li>
+      	<li>les jouets  de Schlavbeuk.</li>
+      </ul>      
+      
+      Vous  pouvez  porter   un  objet   de  chaque  type. Si   vous trouvez  un
+      objet  de  niveau sup&eacute;rieur   &agrave; celui    que vous    portez,
+      vous    jetez   l'ancien  et      prenez   le     nouveau,   sinon    vous
+      d&eacute;laissez l'objet.  Vous pouvez   obtenir  la   liste   des  objets
+      que  vous   portez (et des autres)  <a href="players.php">ici</a></p>
+
+      <p>Comme vous pouvez  vous  en  doutez,  la probabilit&eacute; de  trouver
+      un  objet  de  "gros  bill"   est  plus  faible   qu'un  objet  de  valeur
+      raisonnable. Voici la "formule" exacte :</p>
+
+      
+           pour chaque 'nombre' de 1 &agrave; VOTRE_NIVEAU*1.5<br />
+           &nbsp;&nbsp;vous avez 1 / ((1.4)^nombre) de chance de trouver un objet de ce niveau<br />
+           fin de pour
+      
+
+      <p>La  probabilit&eacute;   de  tomber   sur  chaque   type  d'objet   est
+      &eacute;gale.</p>
+    
+
+
+    <h2>Batailles</h2>
+    
+      <p>Quand vous gagnez un niveau, si celui-ci est inf&eacute;rieur  &agrave;
+      25,  vous avez    25% de   chance  de  d&eacute;fier quelqu'un.   S'il est
+      sup&eacute;rieur  &agrave;  25,  vous  combattrez  &agrave;  chaque  fois.
+      Votre     adversaire      sera    choisi      au     hasard   parmi    les
+      personnages  connect&eacute;s.  Si   il   n'y    a   plus   personne   de
+      connect&eacute; vous  ne   vous battrez    pas (c'est  pas Fight  Club ici
+      !).    Dans  le  cas      o&ugrave;       vous       combattez,      voici
+      comment est d&eacute;cid&eacute;e la victoire :</p>
+
+      <ul>
+          <li>La somme de tous vos objets est calcul&eacute;e.</li>
+          <li>La somme de objets de votre adversaire est calcul&eacute;e.</li>
+          <li>Un  nombre  choisi   au  hasard  entre   0  et  votre   somme  est
+          tir&eacute;.</li>
+          <li>Un   nombre   choisi   au  hasard   entre  0   et  sa   somme  est
+          tir&eacute;.</li>
+          <li>Celui qui a la plus grosse a gagn&eacute; ;-)</li>
+      </ul>
+
+      <p><u>Si  vous  gagnez</u>,  votre  temps  avant  le  prochain  niveau est
+      diminu&eacute; suivant le  niveau  de votre  adversaire selon  la  formule
+      :</p>
+
+      
+         ((le plus grand entre (NIVEAU_ADVERSAIRE/4) et 7) / 100) *
+         TEMPS_AVANT_PROCHAIN_NIVEAU
+      
+
+      <p>Cela signifie que vous ne pouvez  pas gagner plus de 7% de  votre temps
+      avant  le  prochain niveau.  Quand  vous gagnez,  votre  adversaire  n'est
+      pas p&eacute;nalis&eacute;,   &agrave;  moins   que  vous   ayez  fait  un
+      <a href="#critstrike">coup critique</a>.</p>
+
+      <p><u>Si  vous  perdez</u>,  vous  &ecirc;tes  p&eacute;nalis&eacute;.  La
+      p&eacute;nalit&eacute; est calcul&eacute;e suivant la formule :</p>
+
+      
+        ((le plus grand entre (NIVEAU_ADVErSAIRE/4) et 7) / 100) *
+         TEMPS_AVANT_PROCHAIN_NIVEAU
+      
+
+      <p>Cela signifie que vous ne pouvez  pas avoir une  p&eacute;nalit&eacute;
+      de plus  de  7%  de votre  temps avant   le  prochain  niveau. Quand  vous
+      perdez votre adversaire n'est jamais r&eacute;compens&eacute;.</p>
+
+      <p><u>Se battre  contre Schlavbeuk</u>  est un  cas particulier.  Dans  ce
+      cas, la somme de  objets de dieu est  1+[la plus grande somme  de tous les
+      joueurs]. Le  gain  en  cas  de  victoire est   20%  du temps  et   de 10%
+      en  cas de d&eacute;faite.</p>
+
+      <p>Si plus de 15% des joueurs sont de niveau 45  ou plus un joueur   parmi
+      ceux ci va combattre un autre joueur au hasard toute les heures. Ceci afin
+      d'acc&eacute;l&eacute;rer les passages des hauts niveaux.</p>
+
+      <p>De plus, il y  a un  syst&egrave;me de carte. Il s'agit d'une carte  de
+      taille 500&nbsp;x&nbsp;500 sur  laquelle de d&eacute;placent  les joueurs.
+      Si  vous   rencontrez  un  autre   joueur  sur  la   carte  vous  avez une
+      probabilit&eacute;   de   1/(NOMBRE_DE_JOUEURS_CONNECT&Eacute;S)   de   le
+      combattre.   Plus      d'information      sur      la       carte     sont
+      disponible    <a href="#grid">ici</a>.</p>
+      
+      <p>Et  encore  :   un  combat  remport&eacute;   peut  entra&icirc;ner  le
+      <a href="#stealing">vol</a> d'un objet.</p>
+    
+    
+    <a name="uniqueitems"></a><h2>Objets uniques</h2>
+    
+      <p>Apr&egrave;s  le niveau  25, vous  tomberez  parfois  sur un  objet  de
+      valeur  bien sup&eacute;rieur &agrave;  ce que vous pourriez  trouver pour
+      votre   niveau.  Il   s'agit     d'objets    uniques    qui   ont      les
+      caract&eacute;ristiques suivantes :</p>
+      
+      <table id="uniques" class="uniques">
+        <tr>
+          <th>Nom</th>
+          <th>Plage de valeurs</th>
+          <th>Niveau requis</th>
+          <th>Probabilit&eacute;</th>
+        </tr>
+        <tr>
+          <th>Mattt's Omniscience Grand Crown</th>
+          <td>50-74</td>
+          <td>25 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Juliet's Glorious Ring of Sparkliness</th>
+          <td>50-74</td>
+          <td>25 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Res0's Protectorate Plate Mail</th>
+          <td>75-99</td>
+          <td>30 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Dwyn's Storm Magic Amulet</th>
+          <td>100-124</td>
+          <td>35 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Jotun's Fury Colossal Sword</th>
+          <td>150-174</td>
+          <td>40 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Drdink's Cane of Blind Rage</th>
+          <td>175-200</td>
+          <td>45 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Mrquick's Magical Boots of Swiftness</th>
+          <td>250-300</td>
+          <td>48 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+        <tr>
+          <th>Jeff's Cluehammer of Doom</th>
+          <td>300-350</td>
+          <td>52 ou +</td>
+          <td>1 / 40</td>
+        </tr>
+      </table>
+    
+    <h2>La Main de Schlavbeuk</h2>
+    
+      <p>Chaque personnage connect&eacute; a (approximativement) 1/20 de  chance
+      par  jour d'&ecirc;tre  affect&eacute; par  la "Main  de Schlavbeuk".  Une
+      <i>MdS</i> peut aider  ou freiner   votre progression  en modifiant  de  5
+      &agrave;   75%    votre  temps    restant.   Schlavbeuk  &eacute;tant  par
+      nature bon envers  ses  sujets,   il  vous aidera  dans   80%   des    cas
+      et    vous p&eacute;nalisera dans  les 20% restant.</p>
+
+      <p>De plus,   les admins   peuvent provoquer   des <i>MdS</i>   selon leur
+      bon vouloir.</p>
+    
+
+    <a name="critstrike"></a><h2>Coups critiques</h2>
+    
+      <p>Si une personne gagne un tournoi, il a 1/35 de chance de faire un  coup
+      critique.   Dans  ce  cas,   son  adversaire   sera p&eacute;nalis&eacute;
+      suivant la formule : </p>
+      
+        ((nombre entre 5 et 25) / 100) * TEMPS_AVANT_PROCHAIN_NIVEAU_ADVERSAIRE
+      
+      <p>Ce qui signifie qu'il  ne peut pas perdre  moins de 5% de  son temps et
+      pas plus de 25%.</p>
+    
+
+    <h2>Combat en &eacute;quipe</h2>
+    
+      <p>Chaque heure,  il  y  a 1/4   de chance  qu'un  combat en &eacute;quipe
+      aie lieu. Dans ce cas, 3 joueurs formant une &eacute;quipe vont  combattre
+      un  autre  groupe  de  3  joueurs.  La   somme  des  objets  de  tous  les
+      membres  d'une   &eacute;quipe   est   calcul&eacute;e    et   on   combat
+      suivant   les  r&egrave;gles habituelles.   Si le   premier groupe  gagne,
+      20%  du temps le plus court parmi ses  joueurs est enlev&eacute;  &agrave;
+      chaque personne  de l'&eacute;quipe.  Si le  premier groupe  perd, 20%  du
+      temps  le  plus   court  parmi  ses  joueurs  est  ajout&eacute;  &agrave;
+      l'&eacute;quipe.</p>
+    
+
+    <h2>Mal&eacute;dictions</h2>
+    
+      <p>Chaque  joueur   a  (approximativement)   1/8   de   chance  par   jour
+      d'&ecirc;tre  touch&eacute; par  une mal&eacute;diction.  Il s'agit  d'une
+      grande malchance qui peut :
+      
+      <ul>
+        <li>vous ralentir de 5 &agrave; 12% de votre temps</li>
+        <li>diminuer un de vos objets de 10%</li>
+      </ul>
+      </p>
+    
+
+    <h2>B&eacute;n&eacute;diction</h2>
+    
+      <p>Chaque  joueur   a  (approximativement)   1/8   de   chance  par   jour
+      d'&ecirc;tre touch&eacute;  par une  b&eacute;n&eacute;diction. Il  s'agit
+      d'un grand instant de bonheur qui peut :
+      
+      <ul>
+        <li>vous acc&eacute;l&eacute;rer de 5 &agrave; 12% de votre temps</li>
+        <li>augmenter un de vos objets de 10%</li>
+      </ul>
+      </p>
+    
+
+    <h2>Qu&ecirc;tes</h2>
+    
+      <p>Lors d'une qu&ecirc;te,  4 joueurs connect&eacute;s  depuis plus de  10
+      heures   parmi   ceux  de   niveau   40  et   plus   sont  choisis    pour
+      repr&eacute;senter et  assister le  royaume. Si  tous les  quatre arrivent
+      &agrave; la  fin de  la qu&ecirc;te,  chacun gagne  25% de  son temps (le
+      temps &agrave; la fin de  la qu&ecirc;te). Pour terminer une  qu&ecirc;te,
+      personne ne devra prendre de p&eacute;nalit&eacute;. Il y a deux types  de
+      qu&ecirc;tes :
+      
+      <ul>
+        <li>Les qu&ecirc;tes bas&eacute;es sur la carte</li>
+        <li>Les qu&ecirc;tes bas&eacute;es sur le temps</li>
+      </ul>
+      
+      Les qu&ecirc;tes de temps durent entre 12 et 24 heures.<br />
+      
+      Les   qu&ecirc;tes    de   carte    se   rapportent    &agrave;   la    <a
+      href="#grid">carte</a> et  n'ont pas  de limite  de temps  pour &ecirc;tre
+      termin&eacute;e.  Les  personnages  impliqu&eacute;s  dans  la qu&ecirc;te
+      doivent passer par certains endroits pour la terminer.<br />
+      
+      Si une  qu&ecirc;te est   interrompue,   <b>TOUS</b>   les   joueurs    en
+      ligne   ont    une p&eacute;nalit&eacute; p15 comme punition.</p>
+    
+    
+    <a name="grid"></a><h2>La carte</h2>
+    
+      <p>La  carte est  une grille  de 500&nbsp;x&nbsp;500  points sur  laquelle
+      &eacute;voluent   les  joueurs.    Chaque  secondes,   chaque   personnage
+      &agrave; une probabilit&eacute;  &eacute;quivalente de se  d&eacute;placer
+      verticalement et  horizontalement (ou  pas). Si  vous arriver  sur la case
+      d'un autre joueur il y a 1/(NOMBRE_JOUEURS_CONNECT&Eacute;S) chance  qu'un
+      combat s'en  suive. Les r&egrave;gles habituelles s'appliquent alors.</p>
+      
+      <p>Certaine  qu&ecirc;te  demande  que les  joueurs  atteignent  un  point
+      pr&eacute;cis sur  la carte.  Dans la  lign&eacute;e de  ce JdR, le voyage
+      est   fait  pour    vous.  Votre    personnage  va    se   d&eacute;placer
+      automatiquement  dans la   bonne direction,   mais plus   lentement  qu'en
+      temps normal    (afin d'&eacute;viter   les  accidents   bien  sur.   Vous
+      ne  voudriez   pas  tomber  et  donner   une   p&eacute;nalit&eacute;  p15
+      &agrave; l'ensemble  du royaume !).</p>
+    
+    
+    <a name="stealing"></a><h2>Vol d'objets</h2>
+    
+      <p>A la fin  de chaque bataille,   si  l'attaquant gagne,  il y a  un  peu
+      moins de 2%   de chance  de  voler  un  objet   &agrave; son   adversaire.
+      Seul  les   objets  de    valeur  sup&eacute;rieure    peuvent  &ecirc;tre
+      vol&eacute; et l'ancien  objet    de   l'attanquant   est    donn&eacute;e
+      &agrave;  la victime   par piti&eacute;. </p>
+    
+
+
+    <h2>Cr&eacute;dits</h2>
+    
+      <p>Des grands  mercis au  cr&eacute;ateur de  la carte  de la version 3.0,
+      res0 and  Jeb! Le  jeu ne  serait vraiment  pas la  m&ecirc;me chose  sans
+      vous.</p>
+      
+      <p>Le  jeu  IRPG  ne  serait  pas  possible  dans  l'aide  de   nombreuses
+      personnes.  Merci    beaucoup  &agrave;   jwbozzy,   yawnwraith,  Tosirap,
+      res0, dwyn,  Parallax, protomek,   Bert, clavicle, drdink,  jeff,  rasher,
+      Sticks,    Nerje, Asterax,  emad, inkblot(!),  schmolli, mikegrb,  mumkin,
+      sean,  Minhiriath, and  Dan. Malheureusement la    liste est devenue  trop
+      pour &ecirc;tre maintenue.  On trouvera plus  de contributions dans  le <a
+      href="http://idlerpg.net/ChangeLog.txt">ChangeLog</a>.</p>
+    
+
+<?include("footer.php");?>
+
Index: /irpg/trunk/lang
===================================================================
--- /irpg/trunk/lang	(revision 1449)
+++ /irpg/trunk/lang	(revision 1449)
@@ -0,0 +1,1 @@
+link ../bot/lang/
Index: /irpg/trunk/makemap.php
===================================================================
--- /irpg/trunk/makemap.php	(revision 1449)
+++ /irpg/trunk/makemap.php	(revision 1449)
@@ -0,0 +1,60 @@
+<?
+    include("config.php");
+    session_start(); // sessions to generate only one map / person / 20s
+    if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
+        header("Location: maperror.png");
+        exit(0);
+    }
+    $_SESSION['time']=time();
+    $map = imageCreate(500,500);
+
+    $user = substr($_GET['player'],0,30);
+
+    $stringx=$stringy=-1;
+
+    $file = file($irpg_db);
+    unset($file[0]);
+
+    foreach ($file as $line) {
+        list($username,,,,,,,,,,$x,$y) = explode("\t",trim($line));
+        if ($username == $user) {
+            $stringx = $x;
+            $stringy = $y;
+            break;
+        }
+    }
+    if ($stringx == $stringy && $stringx == -1) {
+        imageString($map,5,200,245,"NO SUCH USER",imagecolorallocate($map,255,0,0));
+    }
+    else {
+        $width = imageFontWidth(5);
+        $height = imageFontHeight(5);
+        if ($x+((strlen($user)+1)*$width) > 500) {
+            $stringx = $x - ((strlen($user)+1)*$width)-12;
+        }
+        if ($y+$height > 500) {
+            $stringy = $y - ($height/2)-2;
+        }
+        $magenta = imageColorAllocate($map,255,0,255);
+        imageColorTransparent($map,$magenta);
+        $brown = imagecolorallocate($map, 102, 51, 0);
+        $parchment = imagecolorallocate($map, 255, 255, 204);
+    
+        // Avoid drawing a brown dot on a brown area
+        $rgb = imageColorAt($map, $x, $y);
+        if ($rgb > 0) { // $rgb is 0 on our parchment-colored areas
+            $temp = $brown;
+            $brown = $parchment;
+            $parchment = $temp;
+        }
+        // YOU ARE HERE
+        imageFilledEllipse($map, $x, $y, 6, 6, $brown);
+        // background for text
+        imageFilledRectangle($map,$stringx+6,$stringy-($height/2),$stringx+6+$width*(strlen($user)+1),$stringy+($height/2),$brown);
+        // text itself
+        imageString($map,5,$stringx+7+($width/2),$stringy-($height/2)-1,$user,$parchment);
+    }
+    header("Content-type: image/png");
+    imagePNG($map);
+    imageDestroy($map);
+?>
Index: /irpg/trunk/makequestmap.php
===================================================================
--- /irpg/trunk/makequestmap.php	(revision 1449)
+++ /irpg/trunk/makequestmap.php	(revision 1449)
@@ -0,0 +1,79 @@
+<?
+    include("config.php");
+    $file = fopen($irpg_db,"r");
+    fgets($file, 1024);
+
+    session_start(); // sessions to generate only one map / person / 20s
+    if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
+        header("Location: maperror.png");
+        exit(0);
+    }
+    $_SESSION['time']=time();
+        $file = fopen($irpg_qfile,"r");
+    $type=0;
+    while ($line=fgets($file,1024)) {
+        $arg = explode(" ",trim($line));
+        if ($arg[0] == "Y") {
+            $type = $arg[1];
+        }
+        elseif ($arg[0] == "P") {
+            $p1[0] = $arg[1];
+            $p1[1] = $arg[2];
+            $p2[0] = $arg[3];
+            $p2[1] = $arg[4];
+        }
+        elseif ($arg[0] == "S") {
+            if ($type == 1) $time = $arg[1];
+            elseif ($type == 2) $stage = $arg[1];
+        }
+        elseif ($arg[0] == "P1") {
+            $player[1]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[1]['x'] = $arg[2];
+                $player[1]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P2") {
+            $player[2]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[2]['x'] = $arg[2];
+                $player[2]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P3") {
+            $player[3]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[3]['x'] = $arg[2];
+                $player[3]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P4") {
+            $player[4]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[4]['x'] = $arg[2];
+                $player[4]['y'] = $arg[3];
+            }
+        }
+    }
+    if ($type != 2) {
+        header("Location: maperror.png");
+        exit(0);
+    }
+
+    $map = imageCreate(500,500);
+    $magenta = imageColorAllocate($map, 255, 0, 255);
+    imageColorTransparent($map,$magenta);
+    $blue = imageColorAllocate($map, 0, 128, 255);
+    $red = imageColorAllocate($map, 255, 0, 0);
+
+    imageFilledEllipse($map, $player[1]['x'], $player[1]['y'], 6, 6, $blue);
+    imageFilledEllipse($map, $player[2]['x'], $player[2]['y'], 6, 6, $blue);
+    imageFilledEllipse($map, $player[3]['x'], $player[3]['y'], 6, 6, $blue);
+    imageFilledEllipse($map, $player[4]['x'], $player[4]['y'], 6, 6, $blue);
+    if ($stage == 1) imageFilledEllipse($map, $p1[0], $p1[1], 8, 8, $red);
+    else imageFilledEllipse($map, $p2[0], $p2[1], 9, 9, $red);
+
+    header("Content-type: image/png");
+    imagePNG($map);
+    imageDestroy($map);
+?>
Index: /irpg/trunk/makeworldmap.php
===================================================================
--- /irpg/trunk/makeworldmap.php	(revision 1449)
+++ /irpg/trunk/makeworldmap.php	(revision 1449)
@@ -0,0 +1,39 @@
+<?
+    include("config.php");
+    $file = fopen($irpg_db,"r");
+    fgets($file,1024);
+    $itemfile = fopen($irpg_itemdb,"r");
+    fgets($itemfile,1024);
+
+    session_start(); // sessions to generate only one map / person / 20s
+    if (isset($_SESSION['time']) && time()-$_SESSION['time'] < 20) {
+        header("Location: maperror.png");
+        exit(0);
+    }
+    $_SESSION['time']=time();
+
+    $map = imageCreate(500,500);
+    $magenta = ImageColorAllocate($map, 255, 0, 255);
+    $blue = imageColorAllocate($map, 0, 128, 255);
+    $red = imageColorAllocate($map, 211, 0, 0);
+    $orange = imageColorAllocate($map, 255, 128, 0);
+    $yellow = imageColorAllocate($map, 255, 192, 0);
+    ImageColorTransparent($map, $magenta);
+    while ($line=fgets($file,1024)) {
+        list(,,,,,,,,$online,,$x,$y) = explode("\t",trim($line));
+        if ($online == 1) $color = $blue;
+        else $color = $red;
+        imageLine($map, $x-$crosssize, $y, $x+$crosssize, $y, $color);
+        imageLine($map, $x, $y-$crosssize, $x, $y+$crosssize, $color);
+    }
+    while ($line=fgets($itemfile,1024)) {
+        list($x,$y,,$level) = explode("\t",trim($line));
+        if (is_numeric($level)) $color = $orange;
+        else $color = $yellow;
+        imageLine($map, $x-$crosssize, $y-$crosssize, $x+$crosssize, $y+$crosssize, $color);
+        imageLine($map, $x+$crosssize, $y-$crosssize, $x-$crosssize, $y+$crosssize, $color);
+    }
+    header("Content-type: image/png");
+    imagePNG($map);
+    imageDestroy($map);
+?>
Index: /irpg/trunk/players.php
===================================================================
--- /irpg/trunk/players.php	(revision 1449)
+++ /irpg/trunk/players.php	(revision 1449)
@@ -0,0 +1,34 @@
+<?
+    include("config.php");
+    include("commonfunctions.php");
+    $irpg_page_title = "Les joueurs";
+    include("header.php");
+?>
+
+  <h1>Les joueurs</h1>
+  <h2>Cliquez sur un joueur pour voir son profil complet</h2>
+  <p class="small">[gris=d&eacute;connect&eacute;]</p>
+  <ol>
+<?php
+    $file = file($irpg_db);
+    unset($file[0]);
+    usort($file, 'cmp_level_desc');
+    foreach ($file as $line) {
+        list($user,,,$level,$class,$secs,,,$online) = explode("\t",trim($line));
+
+        $class = htmlentities($class);
+        $next_level = duration($secs);
+
+        print "    <li".(!$online?" class=\"offline\"":"")."><a".
+              (!$online?" class=\"offline\"":"").
+              " href=\"playerview.php?player=".urlencode($user).
+              "\">".htmlentities($user).
+              "</a>, le $class de niveau $level. Prochain niveau dans $next_level.</li>\n";
+
+    }
+?>
+  </ol>
+
+  <p>La liste des joueurs dans un <a href="db.php">tableau</a>.</p>
+
+<?include("footer.php")?>
Index: /irpg/trunk/playerview.php
===================================================================
--- /irpg/trunk/playerview.php	(revision 1449)
+++ /irpg/trunk/playerview.php	(revision 1449)
@@ -0,0 +1,157 @@
+<?php
+    include("config.php");
+
+    $_GET['player'] = substr($_GET['player'],0,30);
+
+    /* Determine if a Player was entered. If not, redirect. */
+    if ($_GET['player']=="") header('Location: http://'.$_SERVER['SERVER_NAME'].
+        ($_SERVER['SERVER_PORT']!=80?':'.$_SERVER['SERVER_PORT']:'').$BASEURL.
+        'players.php');
+    
+    $irpg_page_title = "Joueur: " . htmlentities($_GET['player']);
+    $showmap = $_GET['showmap'];
+    
+    include("header.php");
+    include("commonfunctions.php");
+    echo "<h1>Fiche de personnage</h1>";
+    $file = fopen($irpg_db,"r");
+    fgets($file,1024); // skip top comment
+    $found=0;
+    while ($line=fgets($file,1024)) {
+        if (substr($line,0,strlen($_GET['player'])+1) == $_GET['player']."\t") {
+            list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled,
+                 $x,$y,
+                 $pen['mesg'],
+                 $pen['nick'],
+                 $pen['part'],
+                 $pen['kick'],
+                 $pen['quit'],
+                 $pen['quest'],
+                 $pen['logout'],
+                 $created,
+                 $lastlogin,
+                 $item['amulet'],
+                 $item['charm'],
+                 $item['helm'],
+                 $item['boots'],
+                 $item['gloves'],
+                 $item['ring'],
+                 $item['leggings'],
+                 $item['shield'],
+                 $item['tunic'],
+                 $item['weapon'],
+                 $alignment,
+            ) = explode("\t",trim($line));
+            $found=1;
+            break;
+        }
+    }
+    if (!$found) echo "<h1>Erreur</h1><p><b>Utilisateur inconnu.</b></p>\n";
+    else {
+        $class=htmlentities($class);
+        /* if we htmlentities($user), then we cannot use links with it. */
+        echo "      <p><b>Pseudo :</b> ".htmlentities($user)."<br />\n".
+             "      <b>Profession :</b> $class<br />\n".
+             "      <b>Admin ? :</b> ".($isadmin?"Oui":"Non")."<br />\n".
+             "      <b>Niveau :</b> $level<br />\n".
+             "      <b>Prochain niveau :</b> ".duration($secs)."<br />\n".
+             "      <b>Statut :</b> ".($online?"C":"D&eacute;c")."onnect&eacute;<br />\n".
+             "      <b>Host :</b> ".($uhost?$uhost:"Unknown")."<br />\n".
+             "      <b>Date de cr&eacute;ation :</b> ".strftime($dateformat,$created)."<br />\n".
+             "      <b>Derni&egrave; connexion :</b> ".strftime($dateformat,$lastlogin)."<br />\n".
+             "      <b>Temps d'inactiv&eacute; total:</b> ".duration($idled)."<br />\n".
+             "      <b>Position :</b> [$x,$y]<br />\n".
+             "      <b>Cot&eacute; :</b> ".($alignment=='e'?"Sadique":($alignment=='n'?"Nain-d&eacute;ci":"Brave"))."<br />\n".
+             "      <b>XML:</b> [<a href=\"xml.php?player=".urlencode($user)."\">link</a>]</p>\n".
+             "    <h2>Carte</h2>\n".
+             "    ".($showmap?"<div id=\"map\"><img src=\"makemap.php?player=".urlencode($user)."\"></div>\n\n":"<p><a href=\"?player=".urlencode($user)."&showmap=1\">Voir la carte</a></p>\n\n")."".
+             "    <h2>Equipement</h2>\n<p>";
+        ksort($item);
+        $sum = 0;
+        foreach ($item_order as $key) {
+        		$val = $item[$key];
+            $uniquecolor="#be9256";
+            if ($key == "helm" && substr($val,-1,1) == "a") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Mattt's Omniscience Grand Crown</font>]";
+            }
+            if ($key == "tunic" && substr($val,-1,1) == "b") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Res0's Protectorate Plate Mail</font>]";
+            }
+            if ($key == "amulet" && substr($val,-1,1) == "c") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Dwyn's Storm Magic Amulet</font>]";
+            }
+            if ($key == "weapon" && substr($val,-1,1) == "d") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Jotun's Fury Colossal Sword</font>]";
+            }
+            if ($key == "weapon" && substr($val,-1,1) == "e") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Drdink's Cane of Blind Rage</font>]";
+            }
+            if ($key == "boots" && substr($val,-1,1) == "f") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Mrquick's Magical Boots of Swiftness</font>]";
+            }
+            if ($key == "weapon" && substr($val,-1,1) == "g") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Jeff's Cluehammer of Doom</font>]";
+            }
+            if ($key == "ring" && substr($val,-1,1) == "h") {
+                $val = intval($val)." [<font color=\"$uniquecolor\">Juliet's Glorious Ring of Sparkliness</font>]";
+            }
+            echo "      ".htmlentities(ucfirst(gettext($key)))." : $val<br />\n";
+            $sum += $val;
+        }
+        echo "      <br />\n      somme: $sum<br />\n".
+             "    </p>".
+             "    <h2>P&eacute;nalit&eacute;s</h2>\n".
+             "    <p>\n";
+
+        ksort($pen);
+        $sum = 0;
+        foreach ($pen as $key => $val) {
+            echo "      $key: ".duration($val)."<br />\n";
+            $sum += $val;
+        }
+        echo "      <br />\n      total: ".duration($sum)."</p>\n";
+
+        $file = fopen($irpg_mod,"r");
+        $temp = array();
+        while ($line=fgets($file,1024)) {
+            if (strstr($line," ".$_GET['player']." ")          ||
+                strstr($line," ".$_GET['player'].", ")         ||
+                substr($line,0,strlen($_GET['player'])+1) ==
+                       $_GET['player']." "                        ||
+                substr($line,0,strlen($_GET['player'])+3) ==
+                       $_GET['player']."'s ") {
+                array_push($temp,$line);
+            }
+        }
+        fclose($file);
+        if (!is_null($temp) && count($temp)) {
+            echo('<h2>');
+            echo $_GET['allmods']!=1?"Derni&egrave;res ":"";
+            echo('Modifications d\'Horlorge</h2><p>');
+            if ($_GET['allmods'] == 1 || count($temp) < 6) {
+                foreach ($temp as $line) {
+                    $line=htmlentities(trim($line));
+                    echo "      $line<br />\n";
+                }
+                echo "      <br />\n";
+            }
+            else {
+                end($temp);
+                for ($i=0;$i<4;++$i) prev($temp);
+                for ($line=trim(current($temp));$line;$line=trim(next($temp))) {
+                    $line=htmlentities(trim($line));
+                    echo "      $line<br />\n";
+                }
+            }
+        }
+        if ($_GET['allmods'] != 1 && count($temp) > 5) {
+?>
+      <br />
+      [<a href="<?php echo $_SERVER['PHP_SELF']."?player=".urlencode($user);?>&amp;allmods=1">Voir toutes les modifications</a> (<?=count($temp)?>)]
+      </p>
+<?php
+        }
+    }
+    include("footer.php");
+?>
+
Index: /irpg/trunk/quest.php
===================================================================
--- /irpg/trunk/quest.php	(revision 1449)
+++ /irpg/trunk/quest.php	(revision 1449)
@@ -0,0 +1,99 @@
+<?php
+    include("config.php");
+    $irpg_page_title = "Les qu&ecirc;tes";
+    include("header.php");
+    echo "        <h1>Qu&ecirc;te en cours</h1>\n";
+    include("commonfunctions.php");
+    $file = fopen($irpg_qfile,"r");
+    $type=0;
+    while ($line=fgets($file,1024)) {
+        $arg = explode(" ",trim($line));
+        if ($arg[0] == "T") {
+            unset($arg[0]);
+            $text = implode(" ",$arg);
+        }
+        elseif ($arg[0] == "Y") {
+            $type = $arg[1];
+        }
+        elseif ($arg[0] == "P") {
+            $p1[0] = $arg[1];
+            $p1[1] = $arg[2];
+            $p2[0] = $arg[3];
+            $p2[1] = $arg[4];
+        }
+        elseif ($arg[0] == "S") {
+            if ($type == 1) $time = $arg[1];
+            elseif ($type == 2) $stage = $arg[1];
+        }
+        elseif ($arg[0] == "P1") {
+            $player[1]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[1]['x'] = $arg[2];
+                $player[1]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P2") {
+            $player[2]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[2]['x'] = $arg[2];
+                $player[2]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P3") {
+            $player[3]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[3]['x'] = $arg[2];
+                $player[3]['y'] = $arg[3];
+            }
+        }
+        elseif ($arg[0] == "P4") {
+            $player[4]['name'] = $arg[1];
+            if ($type == 2) {
+                $player[4]['x'] = $arg[2];
+                $player[4]['y'] = $arg[3];
+            }
+        }
+    }
+    if (!$type) {
+        echo "        <p>D&eacute;sol&eacute;, il n'y a aucune qu&ecirc;te actuellement.</p>\n";
+    }
+    else {
+        echo "        <p><b>Qu&ecirc;te :</b> A $text.</p>\n";
+        if ($type == 1) {
+            echo "        <p><b>Temps restant :</b> ".duration($time-time()).
+                 "</p>\n";
+        }
+        elseif ($type == 2) {
+            if ($stage == 1) {
+                echo "        <p><b>Destination actuelle :</b> [$p1[0],$p1[1]]</p>\n";
+            }
+            else {
+                echo "        <p><b>Destination actuelle :</b> [$p2[0],$p2[1]]</p>>\n";
+            }
+        }
+        for ($i=1;$i<=4;$i++) {
+        	echo "        <p><b>Participant $i :</b> <a href=\"playerview.php?player=".
+             	 urlencode($player[$i]['name'])."\">".htmlentities($player[$i]['name']).
+               "</a><br />\n";
+        	if ($type == 2) {
+             	echo "        <b>Position :</b> [".$player[$i]['x'].",".$player[$i]['y']."]</p>\n";
+        	}
+        	else echo    "<br />\n";
+       	}
+        if ($type == 2) {
+        	echo "        <h2>Carte :</h2>\n".
+          	   "        <p>[Les participant sont en bleu et leur destination en rouge]</p>\n".
+            	 "        <div id=\"map\"><img src=\"makequestmap.php\" alt=\"Carte de la qu&ecirc;te Idle RPG\" usemap=\"#quest\" border=\"0\" /></div>\n".
+            	 "        <map id=\"quest\" name=\"quest\">\n";
+                  
+        	for ($i=1;$i<=4;$i++) {
+        		echo "            <area shape=\"circle\" coords=\"".$player[$i]['x'].",".$player[$i]['y'].",6\" alt=\"".htmlentities($player[$i]['name']).
+            	   "\" href=\"playerview.php?player=".urlencode($player[$i]['name'])."\" title=\"".htmlentities($player[$i]['name'])."\" />\n";
+        	}
+          echo "        </map>\n";
+        }
+        else echo    "<br />\n";
+    }
+    echo "        <br />\n";
+    include("footer.php");
+?>
Index: /irpg/trunk/worldmap.php
===================================================================
--- /irpg/trunk/worldmap.php	(revision 1449)
+++ /irpg/trunk/worldmap.php	(revision 1449)
@@ -0,0 +1,34 @@
+<?
+    include("config.php");
+    $irpg_page_title = "Carte du monde";
+    include("header.php");
+?>
+
+<h1>Carte du monde</h1>
+<p>[Les joueurs offline sont en rouge, les online en bleu, les objets normaux en orange et les objets uniques en jaune]</p>
+
+
+<div id="map">
+    <img src="makeworldmap.php" alt="Carte du monde de IdleRPG" title="Carte du monde de IdleRPG" usemap="#world" border="0" />
+    <map id="world" name="world">
+<?
+    $file = fopen($irpg_db,"r");
+    fgets($file,1024);
+    $itemfile = fopen($irpg_itemdb,"r");
+    fgets($itemfile,1024);
+    while($location=fgets($file,1024)) {
+        list($who,,,,,,,,,,$x,$y) = explode("\t",trim($location));
+        print "        <area shape=\"circle\" coords=\"".$x.",".$y.",".$crosssize."\" alt=\"".htmlentities($who).
+              "\" href=\"playerview.php?player=".urlencode($who)."\" title=\"".htmlentities($who)."\" />\n";
+    }
+    while ($line=fgets($itemfile,1024)) {
+        list($x,$y,$type,$level) = explode("\t",trim($line));
+        print "        <area shape=\"circle\" coords=\"".$x.",".$y.",".$crosssize."\" alt=\"".htmlentities($type." [".$level."]").
+              "\" title=\"".htmlentities($type." [".$level."]")."\" />\n";
+    }
+    fclose($file);
+?>
+    </map>
+</div>
+
+<?include("footer.php");?>
Index: /irpg/trunk/xml.php
===================================================================
--- /irpg/trunk/xml.php	(revision 1449)
+++ /irpg/trunk/xml.php	(revision 1449)
@@ -0,0 +1,82 @@
+<?php
+
+    header("Content-Type: text/xml");
+    header("Pragma: no-cache"); 
+
+    include("config.php");
+
+    $_GET['player'] = substr($_GET['player'],0,30);
+
+    /* Determine if a Player was entered. If not, redirect. */
+    if ($_GET['player']=="") header('Location: http://'.$_SERVER['SERVER_NAME'].
+        ($_SERVER['SERVER_PORT']!=80?':'.$_SERVER['SERVER_PORT']:'').$BASEURL.
+        'players.php');
+
+    $file = fopen($irpg_db,"r");
+    fgets($file,1024); // skip top comment
+
+    while ($line=fgets($file,1024)) {
+    	if (substr($line,0,strlen($_GET['player'])+1) == $_GET['player']."\t") {
+            list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled,
+                 $x,$y,
+                 $pen['mesg'],
+                 $pen['nick'],
+                 $pen['part'],
+                 $pen['kick'],
+                 $pen['quit'],
+                 $pen['quest'],
+                 $pen['logout'],
+                 $created,
+                 $lastlogin,
+                 $item['amulet'],
+                 $item['charm'],
+                 $item['helm'],
+                 $item['boots'],
+                 $item['gloves'],
+                 $item['ring'],
+                 $item['leggings'],
+                 $item['shield'],
+                 $item['tunic'],
+                 $item['weapon'],
+                 $alignment,
+            ) = explode("\t",trim($line));
+            break;
+        }
+    }
+    fclose($file);
+    echo "<?xml version=\"1.0\"?>";
+?>
+
+<player>
+    <username><?php print $user?></username>
+    <isadmin><?php print $isadmin?></isadmin>
+    <level><?php print $level?></level>
+    <class><?php print $class?></class>
+    <ttl><?php print $secs?></ttl>
+    <userhost><?php print $uhost?></userhost>
+    <online><?php print $online?></online>
+    <totalidled><?php print $idled?></totalidled>
+    <xpos><?php print $x?></xpos>
+    <ypos><?php print $y?></ypos>
+    <alignment><?php print $alignment?></alignment>
+    <penalties>
+<?php
+        $sum=0;
+        foreach ($pen as $key => $val) {
+            echo "        <$key>$val</$key>\n";
+            $sum += $val;
+        }
+        echo "        <total>$sum</total>\n";
+?>
+    </penalties>
+    <items>
+<?php
+        $sum=0;
+        foreach ($item as $key => $val) {
+            echo "        <$key>$val</$key>\n";
+            $sum += $val;
+        }
+        echo "        <total>$sum</total>\n";
+?>
+    </items>
+</player>
