This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-mbse/mbtask/taskibc.h

91 lines
2.5 KiB
C
Raw Normal View History

2005-04-16 14:49:58 +00:00
#ifndef _TASKIBC_H
#define _TASKIBC_H
2005-04-15 21:36:44 +00:00
/* $Id$ */
#ifdef USE_EXPERIMENT
2005-04-17 10:32:41 +00:00
/*
* Linked list of neighbour chatservers
*/
typedef struct _ncs_list {
struct _ncs_list *next;
char server[64]; /* Server address */
2005-04-17 12:08:59 +00:00
char myname[64]; /* My server address */
2005-04-17 10:32:41 +00:00
char passwd[16]; /* Server password */
int state; /* Connection state */
time_t action; /* Time for next action */
time_t last; /* Last received message */
int version; /* Protocol version of peer */
unsigned remove : 1; /* If entry must be removed */
unsigned compress : 1; /* User link compression */
2005-04-17 14:14:56 +00:00
unsigned gotpass : 1; /* Received valid password */
unsigned gotserver : 1; /* Received valid server */
2005-04-17 10:32:41 +00:00
struct sockaddr_in servaddr_in; /* Peer socketaddress */
int socket; /* Peer socket */
unsigned long token; /* Server token */
} ncs_list;
2005-04-18 12:56:28 +00:00
/*
* Database with servers
*/
typedef struct _srv_list {
struct _srv_list *next;
char server[64]; /* FQDN of the server */
2005-04-18 18:36:27 +00:00
char router[64]; /* Route to this server */
2005-04-18 14:28:41 +00:00
int hops; /* Howmany hops away */
2005-04-18 12:56:28 +00:00
time_t connected; /* Connection time */
2005-04-18 15:19:39 +00:00
char prod[21]; /* Product name */
char vers[21]; /* Version string */
2005-04-20 16:59:32 +00:00
char fullname[37]; /* Full BBS name */
2005-04-18 12:56:28 +00:00
int users; /* Users in chat */
} srv_list;
/*
* Database with users
*/
typedef struct _usr_list {
struct _usr_list *next;
char server[64]; /* FQDN of users server */
2005-04-22 18:39:48 +00:00
char name[10]; /* Users unix name */
char nick[10]; /* Users nick name */
2005-04-20 16:59:32 +00:00
char realname[37]; /* Users real name */
2005-04-18 12:56:28 +00:00
char channel[21]; /* Users channel */
time_t connected; /* Users connect time */
unsigned chanop : 1; /* User is a chanop */
} usr_list;
/*
* Database with channels
*/
typedef struct _chn_list {
struct _chn_list *next;
char server[64]; /* Originating server */
char name[21]; /* Channel name */
char topic[55]; /* Channel topic */
2005-04-20 16:59:32 +00:00
char owner[10]; /* Channel owner */
2005-04-18 12:56:28 +00:00
time_t created; /* Channel created */
int users; /* Users in channel */
} chn_list;
2005-04-21 21:12:50 +00:00
int add_user(usr_list **, char *, char *, char *);
2005-04-20 20:27:32 +00:00
void del_user(usr_list **, char *, char *);
2005-04-23 14:27:52 +00:00
int add_channel(chn_list **, char *, char *, char *);
void del_channel(chn_list **, char *);
2005-04-20 16:59:32 +00:00
2005-04-21 21:12:50 +00:00
void send_all(const char *, ...);
2005-04-16 14:49:58 +00:00
void *ibc_thread(void *);
2005-04-17 10:32:41 +00:00
2005-04-15 21:36:44 +00:00
#endif
#endif