📄 config.h
字号:
/* * 'new' config.h: * A configuration file designed to make best use of the abilities * of ircII, and trying to make things more intuitively understandable. * * Original: Michael Sandrof * V2 by Carl V. Loesch (lynx@dm.unirm1.it) * V2.EPIC by jfn (jnelson@acronet.net) */#ifndef _CONFIG_H_#define _CONFIG_H_/* * Notes to the unwary: * * -- You cant just add a ``#define DEFAULT_X'' and expect it to work. * Those things that do not have defaults are that way on purpose. * Either they have their own defaults, or a default is inappropriate. * * -- Unless the description expliclity says that the #define is optional, * you may NOT remove it or #undef it, else the client will not compile * properly. *//* * This is where you define a list of ``fallback'' servers in case the client * cannot under other circumstances figure out where to connect. Normally, * the server to use is determined by the ``SERVERS_FILE'' (see below), or * by a server specified on the command line. But if for some reason your * ``SERVERS_FILE'' isnt there or isnt readable, or the user doesnt specify * a server, then this list will be used. * * The list should be a space seperated list of the form * hostname:portnum:password. The portnum and password are optional. * An example is: * * #define DEFAULT_SERVER "irc.iastate.edu irc-2.mit.edu:6666:lag-2sux" * * THIS DEFINE IS -!-NOT-!- OPTIONAL. You must provide a fallback list or * the client will NOT compile and work properly! Use the default here if * you dont have other servers to use. */#define DEFAULT_SERVER "localhost irc.efnet.net irc.undernet.org irc.dal.net"/* * Maildir support is experimental in EPIC4. More complete support is * available in EPIC5, including support for switching back and forth * between mbox and maildir at runtime. For now, you must pick one or * the other at compile time. * 0 - Mail checking for mbox * 1 - Mail checking for maildir */#define MAIL_CHECKING_TYPE 0/* * This is an experimental feature to thwart infinite recursion. It is not * very sophisticated so it's not turned on by default. In the future I * will probably do something less lame. * * When this many stack frames are created, epic will refuse to make any * more. This will stop epic from crashing with a segfault when you do * infinite recursion, but it's possible that epic may infinitely recurse * if your alias is tricky enough. Pick your poison */#define MAX_STACK_FRAMES 20000/* * The left and right brace characters ('{', '}') are special characters in * the IRC character set, becuase they represent scandanavian characters and * are not expected to be treated any differently than any other alphanumeric * character. When this is #define'd, the client makes a best guess attempt * to determine if a { is being used as a brace, or as an alphanumeric char. * * The way it determines is simple: * An lbrace ('{') is a normal character UNLESS ONE OF THE FOLLOWING: * * It is the first character on a line * * It is preceeded by whitespace * * It is preceeded by a right paren (')') * * It is preceeded by a right brace ('}') * Similarly, * An rbrace ('}') is a normal character UNLESS ONE OF THE FOLLOWING: * * It is the last character on a line * * It is followed by whitespace * * It is followed by a left paren ('(') * * It is followed by a left brace ('{') * * If the following is #define'd, the above rules are in effect. If the * following is #undef'd, then the normal, traditional rules apply and every * { and } is counted for bracing purposes. * * Some day, if this works out, this will become the default behavior -- * but not today. */#undef BRACE_LOAD_HACK/* * A recent change was to make the %S status line expando always display * the server information, even if you were connected to only one server. * However, a few people expressly dislike this change and want the old * behavior. If this is #define'd, you get the old behavior. If this is * #undef'd, you get the new behavior. */#define OLD_STATUS_S_EXPANDO_BEHAVIOR/* * Oooops! This was supposed to be here, but it never did make it. Which * explains a lot. Anyhow, #define this if you want to have the option of * doing floating point math in EPIC. #undef this if you always want integer * operations to always be done. The client can still do integer operations * if this is defined, just /set floating_point_math OFF. * * Note that if this is defined, the client actually will do all of your * operations in floating point and then the *result* will be truncated. * This is different from when this is #undef when *each term* will be * truncated. For example: * * #undef'd 4.2 - 2.6 -> (4 - 2) -> 2 * #define'd 4.2 - 2.6 -> 1.6 -> 1 */#define FLOATING_POINT_SUPPORT/* * Undef this if your FIONREAD is not useful. At this time, it makes very * little difference because we dont use FIONREAD for anything useful. But * nevertheless, if youre allergic to mild bsd-isms, then you can #undef this. */#define HAVE_USEFUL_FIONREAD/* * This sets how you want to see the 368 numeric to be hooked. The default * (#undef) is the traditional EPIC behavior. * EPIC ircII * $0 server server * $1 number of bans channel name * $2 channel name <nothing -- now number of bans> */#undef IRCII_LIKE_BAN_SUMMARY/* * When this is define'd, the -z flag, the IRCUSER and USER environment * variables, as well as the /IRCUSER command will be honored. This is * not nearly as big a deal as it used to be, because every server uses * identd and ignores the client-specified username. There is no compelling * reason for any site using identd to forbid this behavior by default. * Any site that wont run identd i dont have a lot of sympathy for. */#define ALLOW_USER_SPECIFIED_LOGIN/* * I moved this here because it seemed to be the most appropriate * place for it. Define this if you want support for ``/window create'' * and its related features. If you dont want it, youll save some code, * and you wont need 'wserv', and if you do want it, you can have it in * all of its broken glory. */#define WINDOW_CREATE/* * Define this if you want an mIRC compatable /dcc resume capability. * Note that this BREAKS THE IRC PROTOCOL, and if you use this feature, * the behavior is NON COMPLIANT. If this warning doesnt bother you, * and you really want this feature, then go ahead and #define this. * * Unfortunately, due to popular pressure, im having to #define this by * default. The capability wont be turned on, however, unless you also * do a /set mirc_broken_dcc_resume on, which is OFF by default. No, * there will not be a way to default it to ON short of modifying vars.c. * This is a comprimise, and i wont give any further. Those who dont want * this feature can #undef this, or can hook /on set "mirc_broken_dcc_resume". */#define MIRC_BROKEN_DCC_RESUME/* * Youll want to define this if your system is missing the glob() * call, or if its broken (solaris). * * Actually, you should #define this if you can compile the supplied * glob.c. If it works, dont mess with it. */#define NEED_GLOB/* * ircII has a security feature for paranoid sysadmins or for those * users whose sysadmins are paranoid. The security feature allows * you to restrict who may use the ircII client. You have four options: * * 1) compile into the binary a list of uids who can use the program * *Pros: cant be hacked -- very secure * *Cons: cant be changed w/o recompiling * 2) compile into the binary a file which will contain the uids of * the people who can use the program * *Pros: can be changed as you need by just editing the file * *Cons: since the uids are in a file, prone to hacking * 3) compile into the binary a file which will contain the uids of * the people who cannot use the program * *Pros: allows for public use and allow you to exclude * troublemakers without enumerating everyone else * *Cons: since the uids are in a file, prone to hacking * 4) compile into the binary a password * *Pros: cant be hacked -- secure * *Cons: cant be changed w/o recompiling * * The first two options are mutually exclusive. The third and fourth * options can be specified at your option. If you specify both the * first and second options, the first option has precedence. *//* * To use the first security feature, #define HARD_SECURE. You will also * have to #define VALID_UIDS which will be a list of those uids (integers, * not usernames) which will be allowed to execute the resulting program. * If you #define HARD_SECURE but do not define #VALID_UIDS, then noone * will be able to execute the program! */#undef HARD_SECURE#define VALID_UIDS "100 101"/* * To use the second security measure, simply #define SOFT_SECURE to a * filename that will be world-readable that will contain the uids of * all the users who will be allowed to execute the program. It is important * that this file be readable by at least every person who can execute the * program or this security measure will be comprimised. * * The uid file should have one uid per line (integer, not username). * * You can define VALID_UID_FILE, but if SOFT_SECURE is not defined, it will * not be used. */#undef SOFT_SECURE#define VALID_UID_FILE "/home/jnelson/..."/* * This allows you to use the third security option. If you define this, * it should be assigned to a file that will contain a listing of all of * the uids (integers, not usernames) that will not be allowed to execute * the resulting program. *//*#define INVALID_UID_FILE "/home/jnelson/...."*//* * This part lets you deny certain hosts from running your irc client. * For instance, my university does not allow irc'ing from dialup machines, * So by putting the dialup's hostnames in the specified file, they can't * Run irc. * -- Chris Mattingly <Chris_Mattingly@ncsu.edu> * * If you define this, it *absolutely* must be in double quotes ("s)! */#undef HOST_SECURE#ifdef HOST_SECURE#define INVALID_HOST_FILE "/home/jnelson/...host.deny"#endif/* * This allows you to use the fourth security option. If you define this, * the program will prompt the user to enter this prompt before it will * continue executing the program. This password does not affect in any * way the other protection schemes. A user who is not allowed to run * the program will not be allowed to use the program even if they know * the password. *//*#define PASSWORD "booya"*//* * This is the fun part. If someone runs your program who shouldnt run * it, either because the dont know the password or because they arent * on the valid list or whatever, ircII will execute this program to * "spoof" them into thinking your program is actually some other program. * * This can be defined to any valid C expression that will resolve to a * character string. (ie, a character literal or function call) */#define SPOOF_PROGRAM getenv("SHELL")/* * If you define UNAME_HACK, the uname information displayed in the * CTCP VERSION info will appear as "*IX" regardless of any other * settings. Useful for paranoid users who dont want others to know * that theyre running a buggy SunOS machine. >;-) */#undef UNAME_HACK/* And here is the port number for default client connections. */#define IRC_PORT 6667/* * If you want to have a file containing the list of irc servers to * use, define SERVERS_FILE to be that filename. Put the file in the * ircII library directory. This file should be whitespace seperated * hostname:portnum:password (with the portnum and password being * optional). This server list will supercede the DEFAULT_SERVER */#define SERVERS_FILE "ircII.servers"/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -