irssi/src/core/servers-setup.h
Timo Sirainen 4a33801669 Added/moved several "typedef struct _XXX XXX;" to common.h so that
they're known to all files and I don't need those stupid "void *xxx"
anymore just to avoid useless #include. Header files themselves don't
either include others as often anymore.

Added channel->ownnick to point to our NICK_REC in channel's nicks.
Gives a minor speedup in few places :)

Moved completion specific lastmsgs from channel/server core records to
fe-common/core specific records. Also changed the nick completion logic
a bit so it should work better now. Removed
completion_keep_publics_count setting, but changed the meaning of
completion_keep_publics to same as _count was before. Nick completion
doesn't have any time specific code anymore.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1034 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-01 07:45:54 +00:00

46 lines
1.4 KiB
C

#ifndef __SERVERS_SETUP_H
#define __SERVERS_SETUP_H
#include "modules.h"
#define SERVER_SETUP(server) \
MODULE_CHECK_CAST(server, SERVER_SETUP_REC, type, "SERVER SETUP")
#define IS_SERVER_SETUP(server) \
(SERVER_SETUP(server) ? TRUE : FALSE)
/* servers */
struct _SERVER_SETUP_REC {
#include "server-setup-rec.h"
};
extern GSList *setupservers;
extern IPADDR *source_host_ip; /* Resolved address */
extern int source_host_ok; /* Use source_host_ip .. */
/* Fill reconnection specific information to connection
from server setup record */
void server_setup_fill_reconn(SERVER_CONNECT_REC *conn,
SERVER_SETUP_REC *sserver);
/* Create server connection record. `dest' is required, rest can be NULL.
`dest' is either a server address or chat network */
SERVER_CONNECT_REC *
server_create_conn(const char *dest, int port,
const char *password, const char *nick);
/* Find matching server from setup. Try to find record with a same port,
but fallback to any server with the same address. */
SERVER_SETUP_REC *server_setup_find(const char *address, int port);
/* Find matching server from setup. Ports must match or NULL is returned. */
SERVER_SETUP_REC *server_setup_find_port(const char *address, int port);
void server_setup_add(SERVER_SETUP_REC *rec);
void server_setup_remove(SERVER_SETUP_REC *rec);
void servers_setup_init(void);
void servers_setup_deinit(void);
#endif