File: dlapi.c

package info (click to toggle)
tirc 1.2-10
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,388 kB
  • ctags: 1,909
  • sloc: ansic: 19,264; sh: 2,671; makefile: 222; awk: 14
file content (64 lines) | stat: -rw-r--r-- 1,299 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*-
 * tirc -- client for the Internet Relay Chat
 *
 *	Copyright (c) 1996, 1997, 1998
 *		Matthias Buelow.  All rights reserved.
 *
 *	See the file ``COPYRIGHT'' for the usage and distribution
 *	license and warranty disclaimer.
 */

#ifndef lint
static char rcsid[] = "$Id: dlapi.c,v 1.2 1998/02/24 18:30:16 mkb Exp $";
#endif

#define	TIRC_DL_IMPLEMENTATION	1
#include "dlapi.h"

#ifdef	WITH_DLMOD

extern char	version[], ppre[], osstring[];

void
tirc_get_strings(sinfo)
	struct tirc_sstat_info *sinfo;
{
	sinfo->si_ppre = ppre;
	sinfo->si_version = version;
	sinfo->si_osstring = osstring;
}

extern int	on_irc;
extern char	*srvnm, *srvdn;
extern int	sock, port;
extern time_t	t_uptime, t_connecttime;

void
tirc_get_connection_status(cstat)
	struct tirc_cstat_info *cstat;
{
	cstat->cs_is_conn = on_irc;
	cstat->cs_srv_dnsn = srvdn;
	cstat->cs_srv_ircn = srvnm;
	cstat->cs_srv_inaddr = get_irc_s_addr();
	cstat->cs_srv_sock = sock;
	cstat->cs_srv_port = port;
	cstat->cs_uptime = t_uptime;
	cstat->cs_connecttime = t_connecttime;
}

extern char	nick[], *realname;
extern int	umd, is_away;

void
tirc_get_user_status(ustat)
	struct tirc_ustat_info *ustat;
{
	ustat->us_realname = realname;
	ustat->us_nick = nick;
	ustat->us_umodes = umd;
	ustat->us_away = is_away;
}

#endif	/* WITH_DLMOD */