1 /*
2  * irc.h: header file for all of ircII!
3  *
4  * Copyright 1990 Michael Sandrof
5  * Copyright 1991 Troy Rollo
6  * Copyright 1994 Matthew Green
7  * Copyright 1997 EPIC Software Labs
8  * See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
9  */
10 
11 #ifndef __irc_h__
12 #define __irc_h__
13 
14 #define IRCII_COMMENT   "Accept no limitations."
15 #define IRCRC_NAME 	"/.ircrc"
16 #define EPICRC_NAME 	"/.epicrc"
17 #define EMAIL_CONTACT 	"list@epicsol.org"
18 
19 /*
20  * Here you can set the in-line quote character, normally backslash, to
21  * whatever you want.  Note that we use two backslashes since a backslash is
22  * also C's quote character.  You do not need two of any other character.
23  */
24 #define QUOTE_CHAR '\\'
25 
26 #include "defs.h"
27 #include "config.h"
28 #include "irc_std.h"
29 #include "debug.h"
30 
31 /* these define what characters do, inverse, underline, bold and all off */
32 /*
33  *	CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION
34  *	CAUTION						CAUTION
35  *	CAUTION		DONT CHANGE THESE!		CAUTION
36  *	CAUTION						CAUTION
37  *	CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION CAUTION
38  *
39  * If you want to change the key bindings for your highlight characters,
40  * then please use /bind .. BOLD, /bind .. REVERSE, /bind .. UNDERLINE,
41  * or /bind .. HIGHLIGHT_OFF.  These are REQUIRED to be set to the way
42  * they are now, as the keybindings simply change whatever you bind these
43  * to these actual values, so if you change these, it will break how
44  * other people see your messages!
45  */
46 #define REV_TOG		'\026'		/* ^V */
47 #define REV_TOG_STR	"\026"
48 #define UND_TOG		'\037'		/* ^_ */
49 #define UND_TOG_STR	"\037"
50 #define BOLD_TOG	'\002'		/* ^B */
51 #define BOLD_TOG_STR	"\002"
52 #define BLINK_TOG	'\006'		/* ^F (think flash) */
53 #define BLINK_TOG_STR	"\006"
54 #define ALL_OFF		'\017'		/* ^O */
55 #define ALL_OFF_STR	"\017"
56 #define ND_SPACE	'\023'		/* ^S */
57 #define ND_SPACE_STR	"\023"
58 #define ALT_TOG		'\005'		/* ^E (think Extended) */
59 #define ALT_TOG_STR	"\005"
60 #define ITALIC_TOG	'\020'		/* ^P */
61 #define ITALIC_TOG_STR	"\020"
62 
63 #define IRCD_BUFFER_SIZE	512
64 /* Last two bytes are always reserved for \r\n */
65 #define MAX_PROTOCOL_SIZE	IRCD_BUFFER_SIZE - 2
66 #define BIG_BUFFER_SIZE		(IRCD_BUFFER_SIZE * 4)
67 
68 /*
69  * This assumes a channel size less than 10 characters.
70  * That should suffice for most non-trivial situations.
71  * Otherwise, your privmsg may get truncated...
72  * This should be fixed by doing it dynamically.
73  */
74 #ifndef INPUT_BUFFER_SIZE
75 #define INPUT_BUFFER_SIZE	(IRCD_BUFFER_SIZE - 20)
76 #endif
77 
78 #define NICKNAME_LEN 30
79 #define NAME_LEN 80
80 #define REALNAME_LEN 50
81 #define PATH_LEN 1024
82 
83 /* irc.c's global variables */
84 extern		int	background;
85 extern		int	current_numeric;
86 extern		int	dead;
87 extern volatile	int	dead_children_processes;
88 extern		int	dumb_mode;
89 extern		int	foreground;
90 extern		int	global_beep_ok;
91 extern		int	inhibit_logging;
92 extern		int	irc_port;
93 extern		int	oper_command;
94 extern		int	privileged_output;
95 extern		int	quick_startup;
96 extern		int	use_flow_control;
97 extern		int	use_iexten;
98 extern		int	use_input;
99 extern		int	waiting_out;
100 extern		int	waiting_in;
101 extern const	char *	compile_info;
102 extern		unsigned char *	cut_buffer;
103 extern		char *	default_channel;
104 extern	const	char 	empty_string[];
105 extern	const	char	space[];
106 extern	const	char	star[];
107 extern	const	char	dot[];
108 extern		char	hostname[NAME_LEN + 1];
109 extern const 	char 	internal_version[];
110 extern		char *	startup_file;
111 extern		char *	irc_lib;
112 extern const 	char 	irc_version[];
113 extern		char *	last_notify_nick;
114 extern		char *	LocalHostName;
115 extern		char *	my_path;
116 extern		char	nickname[NICKNAME_LEN + 1];
117 /* extern	const	char	my_off[]; */
118 extern	const	char	on[];
119 extern	const	char	one[];
120 extern		char	realname[REALNAME_LEN + 1];
121 extern	const	char	ridiculous_version_name[];
122 extern	const unsigned long commit_id;
123 extern		char *	send_umode;
124 extern	const	char *	unknown_userhost;
125 extern	const	char 	useful_info[];
126 extern		char	username[NAME_LEN + 1];
127 extern		char	userhost[NAME_LEN + 1];
128 extern	const	char	zero[];
129 extern	const	char	comma[];
130 extern		char *	highlight_char;
131 extern		int	do_window_notifies;
132 
133 extern 		char *	LocalIPv4HostName;
134 extern 		char *	LocalIPv6HostName;
135 extern		fd_set  readables, held_readables;
136 extern		fd_set  writables, held_writables;
137 extern struct timeval 	start_time;
138 extern struct timeval	idle_time;
139 extern struct timeval	now;
140 extern struct timeval	input_timeout;
141 extern	unsigned	window_display;		/* This is in window.h */
142 
143 /* irc.c's extern functions */
144 	void	io 			(const char *);
145 	void	irc_exit 		(int, const char *, ...) /*__A(2)*/ __N;
146 	BUILT_IN_KEYBINDING(irc_quit);
147 
148         void    load_ircrc              (void);
149 
150 /* This lives in debuglog.h but I need it everywhere */
151 	int     debuglog (const char *format, ...);
152 
153 #endif /* __irc_h */
154