| 1 |
michael |
5052 |
#ifndef IRC_H |
| 2 |
|
|
#define IRC_H |
| 3 |
|
|
|
| 4 |
|
|
#include "inet.h" |
| 5 |
|
|
|
| 6 |
|
|
#define MSGLENMAX 512 + 1 |
| 7 |
|
|
|
| 8 |
|
|
|
| 9 |
|
|
struct bopm_sockaddr |
| 10 |
|
|
{ |
| 11 |
michael |
5120 |
struct sockaddr_in sa4; |
| 12 |
michael |
5052 |
}; |
| 13 |
|
|
|
| 14 |
|
|
struct bopm_ircaddr |
| 15 |
|
|
{ |
| 16 |
michael |
5120 |
struct in_addr in4; |
| 17 |
michael |
5052 |
}; |
| 18 |
|
|
|
| 19 |
|
|
struct UserInfo |
| 20 |
|
|
{ |
| 21 |
michael |
5120 |
char *irc_nick; |
| 22 |
|
|
char *irc_username; |
| 23 |
|
|
char *irc_hostname; |
| 24 |
michael |
5052 |
}; |
| 25 |
|
|
|
| 26 |
|
|
typedef void (*irc_command) (char **, unsigned int, char *, struct UserInfo *); |
| 27 |
|
|
|
| 28 |
|
|
struct CommandHash |
| 29 |
|
|
{ |
| 30 |
michael |
5120 |
const char *command; |
| 31 |
|
|
irc_command handler; |
| 32 |
michael |
5052 |
}; |
| 33 |
|
|
|
| 34 |
michael |
5072 |
extern void irc_send(const char *, ...); |
| 35 |
|
|
extern void irc_send_channels(const char *, ...); |
| 36 |
michael |
5052 |
extern void irc_cycle(void); |
| 37 |
|
|
extern void irc_timer(void); |
| 38 |
|
|
#endif |