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 ROM_CHAR '\022' /* ^R */ 57 #define ROM_CHAR_STR "\022" 58 #define ND_SPACE '\023' /* ^S */ 59 #define ND_SPACE_STR "\023" 60 #define ALT_TOG '\005' /* ^E (think Extended) */ 61 #define ALT_TOG_STR "\005" 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 away_set; 85 extern int background; 86 extern int current_numeric; 87 extern int dead; 88 extern volatile int dead_children_processes; 89 extern int dumb_mode; 90 extern int foreground; 91 extern int global_beep_ok; 92 extern int inhibit_logging; 93 extern int irc_port; 94 extern int ircrc_loaded; 95 extern int loading_global; 96 extern int oper_command; 97 extern int privileged_output; 98 extern int quick_startup; 99 extern int trusted_output; 100 extern int use_flow_control; 101 extern int use_iexten; 102 extern int who_mask; 103 extern int use_input; 104 extern int waiting_out; 105 extern int waiting_in; 106 extern char * args_str; 107 extern char * cannot_open; 108 extern const char * compile_info; 109 extern char * cut_buffer; 110 extern char * default_channel; 111 extern char empty_string[]; 112 extern char space[]; 113 extern char star[]; 114 extern char dot[]; 115 extern char hostname[NAME_LEN + 1]; 116 extern const char internal_version[]; 117 extern char * ircrc_file; 118 extern char * epicrc_file; 119 extern char * startup_file; 120 extern char * irc_lib; 121 extern const char irc_version[]; 122 extern char * last_notify_nick; 123 extern char * LocalHostName; 124 extern char * my_path; 125 extern char nickname[NICKNAME_LEN + 1]; 126 extern char off[]; 127 extern char on[]; 128 extern char one[]; 129 extern char realname[REALNAME_LEN + 1]; 130 extern const char ridiculous_version_name[]; 131 extern const unsigned long commit_id; 132 extern char * send_umode; 133 extern const char * unknown_userhost; 134 extern const char useful_info[]; 135 extern char username[NAME_LEN + 1]; 136 extern char userhost[NAME_LEN + 1]; 137 extern char zero[]; 138 extern char comma[]; 139 extern char * highlight_char; 140 141 extern ISA * LocalIPv4Addr; 142 #ifdef INET6 143 extern ISA6 * LocalIPv6Addr; 144 #endif 145 extern fd_set readables, held_readables; 146 extern fd_set writables, held_writables; 147 extern int global_max_fd; 148 extern struct timeval start_time; 149 extern struct timeval idle_time; 150 extern struct timeval now; 151 extern struct timeval input_timeout; 152 153 /* irc.c's extern functions */ 154 char get_a_char (void); 155 void get_line_return (char, char *); 156 void get_line (char *, int, void (*) (char, char *)); 157 void io (const char *); 158 void irc_exit (int, const char *, ...) /*__A(2)*/ __N; 159 void irc_quit (char, char *); 160 161 #include "reg.h" 162 void dump_load_stack (int); /* XXX command.c */ 163 const char * current_filename (void); /* XXX command.c */ 164 const char * current_loader (void); /* XXX command.c */ 165 int current_line (void); /* XXX command.c */ 166 char * current_package (void); /* XXX command.c */ 167 168 /* keep track of signals for scripted events */ 169 volatile extern int signals_caught[NSIG]; 170 171 #endif /* __irc_h */ 172