Using the admin console?

Discussion about topics that don't fit elsewhere.
Post Reply
quixadhal
Posts: 1
Joined: Tue Aug 25, 2015 2:27 pm

Using the admin console?

Post by quixadhal »

So, I decided to tinker around a bit and setup a private server to see how it worked. It compiled and runs fine on my linux server, and I logged in to create my admin character without issue.

However.... a couple of questions.

On creating a new character, I have a "Guide to Dungeon Keeping", which I can't seem to use in any way. I tried 'r'ead and '/'using, neither of which did anything useful. Presumably, it has some of the answers I'm looking for inside...

And the other question, how do I access the admin console? Version 4.6.0 has no seperate tomenet.console, and it in fact won't compile. I didn't see any options in the config file or the --help listing of the client, and setting the port to be the console port results in some errors in the log files about illegal commands. Telnet'ing directly to that port doesn't provide any feedback at all.

My main question at this point is... how do I safely shut down the server so it doesn't corrupt any files that are being written to? The usual SIGINT is trapped and ignored, and without any admin console, my choices come down to kill -9 or trying to paw through the source code in the hopes that some other signal might be the "shutdown nicely" event.

Any chance of adding a brief console HOWTO to the very helpful player's guide?

Thanks, and I apologize if my search skills were too weak to pry the answer from elsewhere in the forums.
User avatar
tokariew
Posts: 373
Joined: Thu May 13, 2010 8:20 pm
Location: Poland

Re: Using the admin console?

Post by tokariew »

in the server console you can do nearly nothing, only i think kill server using ctrl+c five times, after four, player will get info about shutting down server.
on your admin account you can acces basic commands with ']' key. The key will vary on your keyboard layout, so you will must find the correct key.
On this menu, you can add/remove dungeon, generate new town, voult. make level static/unstatic, summon monsters, change terrain "little tricky", you change terrain under you character, so you need probably wraith form or your char character must have the same name as your account on server, you can edit player, send him gift, valid.

For slash command, you use similar to chatting with player.
check tomenet-4.6.0\lib\text\slash_ad.hlp for info about admin slash command. open it with some sort of notepad
img {
max-width: 100%;
}
https://tokariew.xyz
mikaelh
Developer
Posts: 216
Joined: Sun Dec 13, 2009 3:18 pm

Re: Using the admin console?

Post by mikaelh »

The admin commands are not really properly documented anywhere. One issue is that there's actually a lot of them. If you make an admin character, you will receive a Handbook of Dungeon Keeping. This is actually a spell book with multiple spells inside. You can use the command 'b' to browse it. If you level up some magic schools, you can use the 'm' command to cast the spells.

There are a lot of special slash commands that can be used by admin characters. These are defined in src/server/slash.c and most of them are not documented anywhere outside that source file. One example is the /val command which validates accounts.

In addition, you can execute Lua commands as an admin. For example, if you type this as a chat message:
/ det("Foo")
Then, it will list a bunch of information about a player named Foo (note the space after the slash!). The Lua function det() is defined in lib/scpt/cblue.lua. There are other files with Lua commands too.

As for shutting down the server, you have a few options:
1. Press Ctrl-C (SIGINT) five times in the terminal where you started the server.
2. Executing "killall tomenet.server" in another terminal works just fine because it sends a SIGTERM signal which is recognized by the server.
3. If you are logged in with an admin character, you can use the slash command "/shutdown 0".
Post Reply