#399295 Server chat logging/broadcast for pioneers server, map voting

#399295#5
Date:
2006-11-19 02:27:21 UTC
From:
To:
I have previously played multiplayer online games that had support for
map voting, and had thoughts about what would be minimally required to
implement this in the pioneers-server-console. Here's my thinking of
what would be required:

* Server broadcast messages -- to allow a supporting script to notify
game players of map voting actions.
* Server-side logging -- logging of chat events and player join/exit
events, allowing a supporting script to be aware that a player has voted
for a map (and recording of how many human players there are)

This would have benefit to players, particularly for those people who do
not have the ability to create their own server. In particular, it would
make the the 'Lobby' level more meaningful, allowing people to vote for
maps, rather than having to arrange with another user to set up their
own server.

The following is a sample of what might be expected for chat within a game:

Notice: This server supports voting ('map <name>')
player0: map smalleurope
Notice: 1 vote(s) for map 'smalleurope'
player1: map conquest
Notice: 1 vote(s) for map 'conquest'
player2: map small europe
Notice: 2 vote(s) for map 'smalleurope'
player3: map small europe
Notice: 3 vote(s) for map 'smalleurope'
Notice: 3 (of 4) votes for map 'smalleurope'
Notice: map 'SmallEurope' will be the next map to be played

I have attached a diff file for the server source files from the Debian
source version 0.10.2-2, as well as an example script file that is able
to support this modified server (assuming a looping server loading
script that understands the idea of a next map).

#399295#8
Date:
2007-01-24 14:06:44 UTC
From:
To:
Hi,

Thanks for this suggestion.  Sorry for not replying any sooner.  I'm
forwarding it to upstream "officially".  However, the people there who would
most likely work on it are reading these reports as well (me and Roland), so
there's no guarantee that much will happen soon.  We're a bit busy with other
things. :-(

So don't worry, your request hasn't been ignored, it's just on the to-do list.

Thanks,
Bas Wijnen

#399295#11
Date:
2007-01-24 14:06:44 UTC
From:
To:
Hi,

Thanks for this suggestion.  Sorry for not replying any sooner.  I'm
forwarding it to upstream "officially".  However, the people there who would
most likely work on it are reading these reports as well (me and Roland), so
there's no guarantee that much will happen soon.  We're a bit busy with other
things. :-(

So don't worry, your request hasn't been ignored, it's just on the to-do list.

Thanks,
Bas Wijnen

#399295#16
Date:
2007-07-22 11:49:46 UTC
From:
To:
Hello David,

It has been a long ago since you wrote this report, I hope it is still valid.
...
http://sourceforge.net/tracker/index.php?func=detail&aid=1758410&group_id=5095&atid=305095

I don't see how the attached script must be used. Am I  missing the looping
script? Do I need a running server? Which commandline options must be used?

The patch contains the 'admin send-message', so your first part of the feature
request is fulfilled.
The request for server-side logging: is the '--debug' option not sufficient?
It contains a full transcipt of all messages that are sent.

Regards,
Roland Clobus
Developer for Pioneers

PS: Are you running the server at 121-73-3-223.cable.telstraclear.net?

#399295#21
Date:
2007-07-22 15:17:12 UTC
From:
To:
Roland Clobus wrote:

Yes it is still valid. I'm currently running a pioneers server (Debian version
0.10.2-3) with my patches (which is connected to the pioneers.debian.net
metaserver) and the modifications seem to still work as expected.

David

#399295#26
Date:
2007-07-22 15:52:09 UTC
From:
To:
quote:

I've adapted your patch to avoid the use of sscanf, see
http://sourceforge.net/tracker/index.php?func=detail&aid=1758410&group_id=5095&atid=305095

I don't see how the attached script must be used. Am I  missing the looping
script? Do I need a running server? Which commandline options must be used?

The patch contains the 'admin send-message', so your first part of the feature
request is fulfilled.
The request for server-side logging: is the '--debug' option not sufficient?
It contains a full transcipt of all messages that are sent.

Regards,
Roland Clobus
Developer for Pioneers

#399295#31
Date:
2007-07-24 03:35:57 UTC
From:
To:
Roland Clobus wrote:
Sorry, yes, I did miss that part. I was probably a bit dazed and wasn't
expecting a combination top/bottom post at that time.

Thanks for that. I'll try it out on my server (yes, it is indeed the
121-73-3-223.cable.telstraclear.net you mentioned previously) in the next week
or so.

I guess the main reason I attached that script was to attempt to demonstrate
that I am able to do the nice things I mentioned by just adding in server
messages. Anyway, I've attached updated versions of my scripts to this
(including the script to run the server), which may be a bit more informative.

I get this working by running ./pioneer_server_rotate.sh in one screen/window,
and ./message_check.sh from another window. That way, the pioneer_server_rotate
script loops and runs a pioneers server instance, changing to the map denoted by
nextmap.name (if present, otherwise a random map). The message_check script
checks for map votes, turns that take a bit too long, and things that cause
server freezes; creating a 'nextmap.name' file and restarting the server if
necessary. It would be nice if something like this could be done inside the
server, but I'm not familiar enough with the pioneers code to make those changes.

Yes, the --debug option is very likely to be sufficient (I had not previously
considered using it). I'll let you know how I get on with that.

Thanks for your help,
David Hall (gringer)

#399295#36
Date:
2007-08-12 14:35:29 UTC
From:
To:
Roland Clobus said:

Thanks, the combination of debug messages and your patch are working. I
needed to make a couple of small changes to your patch to work with the
debian version -- possibly because you've made quite a few more changes
since 10.2-3.

* removed 'PB_SILENT, FIRST_VERSION,' from player_broadcast arguments
* set need_gameparam to false for send-message command

I've attached the modified patch (I just altered your patch, rather than
creating a new one), as well as my script files, modified to accomodate
the different debug/error messages.

David

#399295#41
Date:
2008-09-14 05:58:31 UTC
From:
To:
Hi,

I'm still not able to send messages in the most recent version of pioneers
(pioneers-0.12.2). In my last post, I mentioned two fixes in the patch
that I attached. I've attached an updated version of one of the fixes,
which just removes the "needs a valid game" error when trying to send
messages to a server that was started via the command line.

I guess an alternative would be for the server to set the game name when
the command line option is used, although I don't see a [current] need to
specify a game name when only one game is being run on the server.

#399295#46
Date:
2008-09-14 05:59:09 UTC
From:
To:
Hi,

I'm still not able to send messages in the most recent version of pioneers
(pioneers-0.12.2). In my last post, I mentioned two fixes in the patch
that I attached. I've attached an updated version of one of the fixes,
which just removes the "needs a valid game" error when trying to send
messages to a server that was started via the command line.

0:34:28 (6) <-- admin send-message WARNING -- Server will restart in 300
seconds unless
00:34:28 (6) --> ERROR command 'send-message' needs a valid game\n
00:34:28 (6) <-- admin send-message there is additional activity in this game
00:34:28 (6) --> ERROR command 'send-message' needs a valid game\n


I guess an alternative would be for the server to set the game name when
the command line option is used, although I don't see a [current] need to
specify a game name when only one game is being run on the server.

#399295#51
Date:
2008-09-14 07:32:34 UTC
From:
To:
... except that still doesn't seem to result in the message getting passed
through correctly:

$ echo "admin send-message Welcome to gringer's Pioneers server" | nc -q 0
localhost 6650

$ tail -n 4 logs/pioneers.log
02:42:23 (7) --> player 2 setup 0\n
02:42:23 (8) --> player 2 setup 0\n
02:42:23 (9) --> player 2 setup 0\n
02:42:32 (10) <-- admin send-message Welcome to gringer's Pioneers server

I would expect something like the following to appear, but it doesn't:
02:42:34 (10) --> NOTE1 Welcome to gringer's Pioneers server\n