diff options
author | erdgeist <> | 2003-02-12 17:48:37 +0000 |
---|---|---|
committer | erdgeist <> | 2003-02-12 17:48:37 +0000 |
commit | dea6bf757aa9a875eab35b2b650412e7605f1308 (patch) | |
tree | 14ed8374c3a3862529313088375693a7de70d3a7 /vchat-config.h |
CVS moved to erdgeist.org
Diffstat (limited to 'vchat-config.h')
-rwxr-xr-x | vchat-config.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/vchat-config.h b/vchat-config.h new file mode 100755 index 0000000..d7e7305 --- /dev/null +++ b/vchat-config.h | |||
@@ -0,0 +1,127 @@ | |||
1 | /* | ||
2 | * vchat-client - alpha version | ||
3 | * vchat-config.h - declaration of configuration array and default values | ||
4 | * | ||
5 | * Copyright (C) 2001 Andreas Kotes <count@flatline.de> | ||
6 | * | ||
7 | * This program is free software. It can be redistributed and/or modified, | ||
8 | * provided that this copyright notice is kept intact. This program is | ||
9 | * distributed in the hope that it will be useful, but without any warranty; | ||
10 | * without even the implied warranty of merchantability or fitness for a | ||
11 | * particular purpose. In no event shall the copyright holder be liable for | ||
12 | * any direct, indirect, incidental or special damages arising in any way out | ||
13 | * of the use of this software. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef GLOBAL_CONFIG_FILE | ||
18 | # define GLOBAL_CONFIG_FILE "/etc/vchatrc" | ||
19 | #endif | ||
20 | |||
21 | #ifndef GLOBAL_FORMAT_FILE | ||
22 | # define GLOBAL_FORMAT_FILE "/etc/vchatformats" | ||
23 | #endif | ||
24 | |||
25 | /* configuration array with structure as defined in vchat.h */ | ||
26 | extern int usessl; | ||
27 | extern int usetime; | ||
28 | extern unsigned int hscroll; | ||
29 | |||
30 | static volatile configoption configoptions[] = { | ||
31 | /* config-option type name in file default value value localvar */ | ||
32 | {CF_NICK, CO_STR, "nick", NULL, NULL, &nick }, | ||
33 | {CF_FROM, CO_STR, "from", "vc-alpha-0.16", NULL, NULL }, | ||
34 | {CF_SERVERHOST, CO_STR, "host", "pulse.flatline.de",NULL, NULL }, | ||
35 | {CF_SERVERPORT, CO_INT, "port", (char *) 2325, (char *)-1, NULL }, | ||
36 | {CF_CIPHERSUITE, CO_STR, "ciphers", "HIGH:MEDIUM", NULL, NULL }, | ||
37 | {CF_CONFIGFILE, CO_STR, "conffile", "~/.vchat/config", NULL, NULL }, | ||
38 | {CF_CERTFILE, CO_STR, "certfile", "~/.vchat/cert", NULL, NULL }, | ||
39 | {CF_KEYFILE, CO_STR, "keyfile", "~/.vchat/key", NULL, NULL }, | ||
40 | {CF_FORMFILE, CO_STR, "formatfile", "~/.vchat/formats", NULL, NULL }, | ||
41 | {CF_USESSL, CO_INT, "usessl", (char *) 1, (char *)-1, (unsigned char **)&usessl }, | ||
42 | {CF_USECERT, CO_INT, "usecert", (char *) 1, (char *)-1, NULL }, | ||
43 | {CF_USETIME, CO_INT, "usetime", (char *) 1, (char *)-1, (unsigned char **)&usetime }, | ||
44 | {CF_PRIVHEIGHT, CO_INT, "messages", (char *) 0, (char *)-1, NULL }, | ||
45 | {CF_HSCROLL, CO_INT, "hscroll", (char *) 5, (char *)-1, (unsigned char **)&hscroll }, | ||
46 | {CF_CHANNEL, CO_INT, "channel", (char *) 0, (char *)-1, NULL }, | ||
47 | {CF_SCROLLBPRIV, CO_INT, "privscrollb",(char *) 2048, (char *)-1, NULL }, | ||
48 | {CF_SCROLLBACK, CO_INT, "scrollback", (char *) 8192, (char *)-1, NULL }, | ||
49 | {CF_SCROLLBPRIVT,CO_INT, "privscrollt",(char *) 0, (char *)-1, NULL }, | ||
50 | {CF_SCROLLBACKT, CO_INT, "scrolltime", (char *) 86400, (char *)-1, NULL }, | ||
51 | {CF_NIL, CO_NIL, NULL, NULL, NULL, NULL }, | ||
52 | }; | ||
53 | |||
54 | /* | ||
55 | choose option with \001 + | ||
56 | 0 - default colorpair for window | ||
57 | 1 - colorpair 1 RED | ||
58 | 2 - colorpair 2 GREEN | ||
59 | 3 - colorpair 3 YELLOW | ||
60 | 4 - colorpair 4 BLUE | ||
61 | 5 - colorpair 5 MAGENTA | ||
62 | 6 - colorpair 6 CYAN | ||
63 | 7 - colorpair 7 WHITE | ||
64 | 8 - colorpair 8 WHITE on RED | ||
65 | 9 - colorpair 9 WHITE on BLUE | ||
66 | aA - alternate charset on/off | ||
67 | bB - bold on/off | ||
68 | dD - dim on/off | ||
69 | iI - invisible on/off | ||
70 | lL - blink on/off | ||
71 | nN - normal on/off | ||
72 | pP - protected on/off | ||
73 | rR - reverse on/off | ||
74 | sS - standout on/off | ||
75 | uU - underlined on/off | ||
76 | */ | ||
77 | |||
78 | #define FE( ID, STRING) { ID, #ID, STRING } | ||
79 | |||
80 | static formatstring formatstrings[] = { | ||
81 | /* format-string string */ | ||
82 | FE( FS_PLAIN, "%s"), | ||
83 | FE( FS_CHAN, "%s"), | ||
84 | FE( FS_PRIV, "%s"), | ||
85 | FE( FS_SERV, "\0012%s"), | ||
86 | FE( FS_GLOB, "\0012%s"), | ||
87 | FE( FS_DBG, "\0013%s"), | ||
88 | FE( FS_ERR, "\0011%s"), | ||
89 | FE( FS_ERR_STRING, "\0011%s %s"), | ||
90 | FE( FS_IDLE, "\0018%s"), | ||
91 | FE( FS_TIME, "\0015[%H:%M]\0010 "), | ||
92 | FE( FS_TOPICW, "[ Channel %d: %s"), | ||
93 | FE( FS_NOTOPICW, "[ Channel %d has no topic"), | ||
94 | FE( FS_CONSOLE, "[ %s@%s:%d, use .h to get help, send bugs reports and feature requests to vchat@pulse.flatline.de ..."), | ||
95 | FE( FS_CONNECTED, "\0012# Connected to '\0016%s\0012', port \0016%d\0012 ..."), | ||
96 | FE( FS_TOPIC, "\0012# Channel \0016%d\0012 topic is: '\0010%s\0012'"), | ||
97 | FE( FS_NOTOPIC, "\0012# Channel \0016%d\0012 has no topic"), | ||
98 | FE( FS_CHGTOPIC, "\0012# \0016%s\0012 changes topic to: '\0010%s\0012'"), | ||
99 | FE( FS_USMATCH, "\0012# Users matching \"%s\":%s"), | ||
100 | FE( FS_USONLINE, "\0012# Users online: %s"), | ||
101 | FE( FS_SIGNON, "\0012# \0016%s\0012 %s"), | ||
102 | FE( FS_SIGNOFF, "\0012# \0016%s\0012 %s"), | ||
103 | FE( FS_JOIN, "\0012# \0016%s\0012 %s \0016%d"), | ||
104 | FE( FS_LEAVE, "\0012# \0016%s\0012 %s \0016%d"), | ||
105 | FE( FS_NICKCHANGE, "\0012# \0016%s\0012 \0016%s\0012 %s"), | ||
106 | FE( FS_UNKNOWNMSG, "?? unknown message: %s"), | ||
107 | FE( FS_BOGUSMSG, "?? bogus message: %s"), | ||
108 | FE( FS_RXPUBURL, "\0015[\0016%s\0015]\0010 %s"), | ||
109 | FE( FS_MYPUBURL, "\0015[\0016\001u%s\001U\0015]\0010 %s"), | ||
110 | FE( FS_RXPUBMSG, "\0015<\0016%s\0015>\0010 %s"), | ||
111 | FE( FS_MYPUBMSG, "\0015<\0016\001u%s\001U\0015>\0010 %s"), | ||
112 | FE( FS_TXPUBMSG, "\0015<\0016\001b%s\001B\0015>\0010 %s"), | ||
113 | FE( FS_RXPRIVMSG, "\0015*\0016%s\0015*\0010 %s"), | ||
114 | FE( FS_TXPRIVMSG, "\0015-> *\0016%s\0015*\0010 %s"), | ||
115 | FE( FS_BGPRIVMSG, "\0011! Bogus message, not sent."), | ||
116 | FE( FS_PUBACTION, "\0015*\0010 \0016%s\0010 %s"), | ||
117 | FE( FS_TXPUBACTION, "\0015*\0010 \0016\001b%s\001B\0010 %s"), | ||
118 | FE( FS_BGTXPUBACTION,"\0011! No action taken."), | ||
119 | FE( FS_COMMAND, "\0012## command: %s"), | ||
120 | FE( FS_LOCALCOMMAND, "\0012## local command (not executed yet): %s"), | ||
121 | FE( FS_BOGUSCOMMAND, "\0012## bogus command (not executed or sent): %s"), | ||
122 | FE( FS_SBINF, " [%d/%d] "), | ||
123 | FE( FS_MISSTYPED, "\0011* Probably misstyped? Not sent: %s"), | ||
124 | FE( FS_UNKNCMD, "\0011* Unknown client command: %s"), | ||
125 | FE( FS_BADREGEX, "\0011* Could not compile regex: %s"), | ||
126 | FE( FS_PLAIN, NULL) | ||
127 | }; | ||