Files
IdleRPG/irpg-web/admincomms.php
2025-09-18 21:00:20 -06:00

106 lines
4.2 KiB
PHP

<?php
include("config.php");
$irpg_page_title = "Admin Game Info";
$irpg_page_desc = "IdleRPG Game Info for Admins";
include("header.php");
?>
<h1>Idle RPG</h1>
<h2>Admin Commands</h2>
<p>This is not the full list of commands for the Idle RPG bot, but only
the list of admin commands.</p>
<dl>
<dt>INFO</dt>
<dd>retrieve some fairly useless stats about the bot.</dd>
<dt>DIE</dt>
<dd>kills the bot.</dd>
<dt>HOG</dt>
<dd>summon the Hand of God spell. See the main help file.</dd>
<dt>RESTART</dt>
<dd>restarts the bot.</dd>
<dt>CHPASS &lt;char name&gt; &lt;new password&gt;</dt>
<dd>change a character&apos;s pass in the IRPG.</dd>
<dt>CHCLASS &lt;char name&gt; &lt;new class name&gt;</dt>
<dd>change a character&apos;s class in the IRPG.</dd>
<dt>CHUSER &lt;char name&gt; &lt;new char name&gt;</dt>
<dd>change a character&apos;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.</dd>
<dt>PUSH &lt;char name&gt; &lt;seconds&gt;</dt>
<dd>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&apos;t do that.</dd>
<dt>DEL &lt;char name&gt;</dt>
<dd>remove a user&apos;s account.</dd>
<dt>JUMP &lt;server[:port]&gt;</dt>
<dd>move the bot to another server.</dd>
<dt>SILENT &lt;mode&gt;</dt>
<dd>switch bot between 4 modes of silence.
<ul>
<li>mode 0, bot sends all privmsgs.</li>
<li>mode 1, only chanmsg() is disabled.</li>
<li>mode 2, only privmsg()/notice() to non-channels is disabled.</li>
<li>mode 3, privmsgs/notices to users and channels are disabled.</li>
</ul>
</dd>
<dt>BACKUP</dt>
<dd>tell bot to copy $opts{&apos;dbfile&apos;} to .dbbackup/$opts{&apos;dbfile&apos;}TIMESTAMP</dd>
<dt>RELOADDB</dt>
<dd>force bot to reload player database file, rewriting all memory.
RELOADDB can only be used while in pause mode.</dd>
<dt>PAUSE</dt>
<dd>toggle pause mode.</dd>
<dt>PEVAL &lt;code&gt;</dt>
<dd>execute arbitrary argument as Perl code. Queues output &gt; 3 lines
or &gt; 1k of text. Some useful PEVAL commands:
<ul>
<li>Delete all accounts not logged in in 4 weeks (See also: DELOLD):<br />
<code>
/msg bot PEVAL delete $rps{$_} for grep { time()-$rps{$_}{lastlogin} &gt; 3600*24*7*4 && !$rps{$_}{online} } keys %rps;
</code>
</li>
<li>Remove one hour from everyone&apos;s clocks:<br />
<code>
/msg bot PEVAL $rps{$_}{next} -= 3600 for keys %rps;
</code>
</li>
<li>List all online users, separated by commas:<br />
<code>
/msg bot PEVAL join(&apos;, &apos;,grep { $rps{$_}{online} } keys %rps);
</code>
</li>
<li>View contents of a file on remote host:<br />
<code>
/msg bot PEVAL `cat file`
</code>
</li>
<li>Turn on debug mode:<br />
<code>
/msg bot PEVAL $opts{debug}=1;
</code>
</li>
<li>Force write-out of database:<br />
<code>
/msg bot PEVAL writedb();
</code>
</li>
</ul>
</dd>
<dt>DELOLD &lt;days&gt;</dt>
<dd>remove all non-logged-in accounts inactive in the last &lt;days&gt;
days.</dd>
<dt>CLEARQ</dt>
<dd>clear the outgoing message queue. Useful to use if someone floods
the bot with a lot of text that it plans to respond to.</dd>
<dt>MKADMIN &lt;username&gt;</dt>
<dd>set the isadmin flag for a given username.</dd>
</dl>
<?php
include("footer.php");
?>