home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
Divers
/
yagirc-0.51.tar.gz
/
yagirc-0.51.tar
/
yagirc-0.51
/
irc.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-05-05
|
2KB
|
75 lines
#ifndef __IRC_H
#define __IRC_H
#include <glib.h>
#include "data.h"
enum
{
TXT_TYPE_DEFAULT,
TXT_TYPE_ERROR,
TXT_TYPE_SERVER_TEXT,
TXT_TYPE_NOTICE,
TXT_TYPE_DCC,
};
enum
{
IGNORE_PUBLIC,
IGNORE_PRIVATE,
IGNORE_CTCP,
};
#define isircflag(a) ((a) == '@' || (a) == '+' || (a) == '-' || (a) == '~')
void irc_init(void);
void irc_deinit(void);
/* Write text to window, convert color codes. */
void drawtext(WINDOW_REC *win, int type, char *str, ...);
/* Send command to IRC server */
int irc_send_cmd(SERVER_REC *serv, char *cmd);
/* Parse outgoing line */
int irc_parse_outgoing(CHAN_REC *chan, char *line);
/* Connect to IRC server */
SERVER_REC *irc_server_connect(char *name, int port);
/* Disconnect from IRC server */
void irc_server_disconnect(SERVER_REC *server);
/* Create new IRC window, if win == NULL new top level window is created, if
not, new window for same toplevel window as "win" is created. */
WINDOW_REC *irc_window_new(SERVER_REC *server, WINDOW_REC *win);
/* Close IRC window */
void irc_window_close(WINDOW_REC *win);
/* Window got focus */
void irc_window_focus(WINDOW_REC *win);
/* Check if nick is in ignore list */
int irc_is_ignored(char *nick, int type);
/* Select new "default server window" for server messages */
void irc_select_new_server_window(WINDOW_REC *win);
/* Destroy IRC channel record */
void irc_chan_free(CHAN_REC *chan);
/* Find server record */
SERVER_REC *irc_get_server(int handle);
/* Find channel record of chan in server serv, if serv==NULL, find from all servers */
CHAN_REC *channel_joined(SERVER_REC *serv, char *chan);
/* IRC nick comparision for sort functions */
int irc_nicks_compare(char *p1, char *p2);
/* Select any other channel in window except the one we are now */
int irc_select_new_channel(WINDOW_REC *window);
extern GList *winlist; /* List of windows */
extern GList *servlist; /* List of servers */
extern GList *scriptlist; /* List of scripts loaded */
extern GList *aliases; /* List of command aliases */
extern GList *ignores; /* Ignore list */
extern GList *notifies; /* Notify list */
extern WINDOW_REC *curwin; /* current window */
extern SERVER_REC *cserver; /* current server */
#endif