Galactic Bloodshed
Functions | Variables
tele.cc File Reference
#include "gb/tele.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <climits>
#include <cstdio>
#include <cstring>
#include <ctime>
#include "gb/GB_server.h"
#include "gb/buffers.h"
#include "gb/files.h"
#include "gb/files_shl.h"
#include "gb/races.h"
#include "gb/tweakables.h"
#include "gb/vars.h"
Include dependency graph for tele.cc:

Go to the source code of this file.

Functions

void purge ()
 
void post (const char *origmsg, int type)
 
void push_telegram_race (const player_t recipient, const std::string &msg)
 
void push_telegram (const player_t recipient, const governor_t gov, const std::string &msg)
 
void teleg_read (GameObj &g)
 
void news_read (int Playernum, int Governor, int type)
 
void check_for_telegrams (GameObj &g)
 Check for telegrams and notify the player if there is any. More...
 

Variables

static long tm
 
static FILE * teleg_read_fd
 
static char telegram_file [PATHLEN]
 
static struct stat telestat
 
static struct tmcurrent_tm
 

Function Documentation

◆ check_for_telegrams()

void check_for_telegrams ( GameObj g)

Check for telegrams and notify the player if there is any.

  • g Game object

Definition at line 272 of file tele.cc.

◆ news_read()

void news_read ( int  Playernum,
int  Governor,
int  type 
)

Definition at line 219 of file tele.cc.

References putrace(), teleg_read_fd, and telegram_file.

Referenced by read_messages().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ post()

void post ( const char *  origmsg,
int  type 
)

Definition at line 63 of file tele.cc.

References current_tm, and tm.

Referenced by bombard(), capture(), check_overload(), declare(), defend(), dissolve(), doabm(), domine(), domissile(), fire(), give(), insurgency(), invite(), land(), output_ground_attacks(), pay(), pledge(), sell(), send_message(), and walk().

Here is the caller graph for this function:

◆ purge()

void purge ( )

Definition at line 41 of file tele.cc.

◆ push_telegram()

void push_telegram ( const player_t  recipient,
const governor_t  gov,
const std::string &  msg 
)

Definition at line 138 of file tele.cc.

References current_tm, and tm.

◆ push_telegram_race()

void push_telegram_race ( const player_t  recipient,
const std::string &  msg 
)

Definition at line 119 of file tele.cc.

◆ teleg_read()

void teleg_read ( GameObj g)

Definition at line 176 of file tele.cc.

References teleg_read_fd, telegram_file, and telestat.

Referenced by read_messages().

Here is the caller graph for this function:

Variable Documentation

◆ current_tm

struct tm* current_tm
static

Definition at line 29 of file tele.cc.

Referenced by post(), and push_telegram().

◆ teleg_read_fd

FILE* teleg_read_fd
static

Definition at line 25 of file tele.cc.

Referenced by news_read(), and teleg_read().

◆ telegram_file

char telegram_file[PATHLEN]
static

Definition at line 26 of file tele.cc.

Referenced by news_read(), and teleg_read().

◆ telestat

struct stat telestat
static

Definition at line 27 of file tele.cc.

Referenced by teleg_read().

◆ tm

long tm
static

Definition at line 24 of file tele.cc.

Referenced by post(), and push_telegram().