summaryrefslogtreecommitdiff
path: root/vchat-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-config.h')
-rwxr-xr-xvchat-config.h127
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 */
26extern int usessl;
27extern int usetime;
28extern unsigned int hscroll;
29
30static 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/*
55choose option with \001 +
560 - default colorpair for window
571 - colorpair 1 RED
582 - colorpair 2 GREEN
593 - colorpair 3 YELLOW
604 - colorpair 4 BLUE
615 - colorpair 5 MAGENTA
626 - colorpair 6 CYAN
637 - colorpair 7 WHITE
648 - colorpair 8 WHITE on RED
659 - colorpair 9 WHITE on BLUE
66aA - alternate charset on/off
67bB - bold on/off
68dD - dim on/off
69iI - invisible on/off
70lL - blink on/off
71nN - normal on/off
72pP - protected on/off
73rR - reverse on/off
74sS - standout on/off
75uU - underlined on/off
76*/
77
78#define FE( ID, STRING) { ID, #ID, STRING }
79
80static 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};