~ubuntu-branches/ubuntu/natty/stormbaancoureur/natty

« back to all changes in this revision

Viewing changes to src-stormbaancoureur/postscore.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Jon Dowland, Paul Wise
  • Date: 2008-01-03 10:47:41 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080103104741-kbt7suy6ciaapgyf
Tags: 2.1.1-1
[ Barry deFreese ]
* New upstream release. (Closes: #461149).
  + Upstream has replaced potentially non-free engine.tga file.
  + Update patches for new upstream.
* Add myself to uploaders.
* Remove deprecated Encoding tag from desktop file.
* Remove XS- prefix from VCS fields.
* Remove Homepage field from package descriptions.
* Version debhelper build-depends for dh_icons (>= 5.0.51).
* Bump Standards Version to 3.7.3 (No changes needed).
* Add call to dh_desktop in rules.

[ Jon Dowland ]
* add Homepage: to source stanza.

[ Paul Wise ]
* Call dh_icons to update icon caches.
* Improve the description for the data package.
* Clean up the watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * sturmbahnfahrer
3
 
 * (c) 2006 by Bram Stolk
 
3
 * (c) 2006,2007,2008 by Bram Stolk
4
4
 * bram at gmail.com
5
5
 * LICENSED ACCORDING TO THE GPL
6
6
 */
21
21
 
22
22
#include "postscore.h"
23
23
 
24
 
static char *hostname = "leaderboard.sturmbahnfahrer.com";
25
 
//static char *hostname = "bram.creative4vision.nl";
26
 
//static char *hostname = "localhost";
 
24
static char *hostname = "leaderboard.stolk.org";
 
25
static const int portnr=7499;
 
26
 
27
27
static char msg[1472];
28
28
static int  sock=0;
29
29
static struct sockaddr_in addr;
36
36
  if (sock<0)
37
37
    perror("socket");
38
38
 
39
 
  int portnr=7498;
40
 
 
41
39
  struct hostent *he = gethostbyname(hostname);
42
40
  if (!he)
43
41
    perror("gethostbyname");
58
56
  assert(retval);
59
57
  addrlen = sizeof(addr);
60
58
 
61
 
  char m[20];
62
 
  sprintf(m, "%-8s %6.2f", username, tim);
 
59
  char m[128];
 
60
  sprintf(m, "%-8s %6.2f " VERSION_STRING(GAMEVERSION) , username, tim);
63
61
  int rv = sendto(sock, m, strlen(m), 0, (struct sockaddr*) &addr, addrlen);
64
62
  if (rv<0)
65
63
    perror("sendto");