summaryrefslogtreecommitdiff
path: root/vchat.h
diff options
context:
space:
mode:
Diffstat (limited to 'vchat.h')
-rwxr-xr-xvchat.h124
1 files changed, 62 insertions, 62 deletions
diff --git a/vchat.h b/vchat.h
index 33c378b..60d485d 100755
--- a/vchat.h
+++ b/vchat.h
@@ -26,20 +26,20 @@ typedef enum { SM_IGNORE, SM_INFO, SM_USERINFO, SM_CHANNEL, SM_ERROR } smtype;
26/* servermessage structure */ 26/* servermessage structure */
27struct servermessage 27struct servermessage
28{ 28{
29 unsigned char id[4]; /* three-character message id */ 29 char id[4]; /* three-character message id */
30 smtype type; /* message type */ 30 smtype type; /* message type */
31 void (*funct) (unsigned char *); /* function used by client */ 31 void (*funct) (char *); /* function used by client */
32 void (*hook) (unsigned char *); /* function hook for scripting */ 32 void (*hook) (char *); /* function hook for scripting */
33}; 33};
34typedef struct servermessage servermessage; 34typedef struct servermessage servermessage;
35 35
36/* configuration types and variable numbers */ 36/* configuration types and variable numbers */
37typedef enum { CO_NIL, CO_STR, CO_INT } conftype; 37typedef enum { CO_NIL, CO_STR, CO_INT } conftype;
38typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT, 38typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT,
39CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE, CF_LOGFILE, 39CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE,
40CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME, 40CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME,
41CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT, 41CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT,
42CF_KEEPLOG, CF_ENCODING, CF_BELLPRIV } confopt; 42CF_ENCODING, CF_BELLPRIV } confopt;
43 43
44/* format strings */ 44/* format strings */
45typedef enum { FS_PLAIN, FS_CHAN, FS_PRIV, FS_SERV, FS_GLOB, FS_DBG, FS_ERR, 45typedef enum { FS_PLAIN, FS_CHAN, FS_PRIV, FS_SERV, FS_GLOB, FS_DBG, FS_ERR,
@@ -54,14 +54,14 @@ FS_SBINF, FS_MISSTYPED, FS_UNKNCMD, FS_BADREGEX, FS_ERR_STRING } formtstr;
54/* configoption structure */ 54/* configoption structure */
55struct configoption 55struct configoption
56{ 56{
57 confopt id; 57 confopt id;
58 conftype type; 58 conftype type;
59 unsigned char *varname; 59 char *varname;
60 unsigned char *defaultvalue; 60 char *defaultvalue;
61 unsigned char *value; 61 char *value;
62 union { 62 union {
63 unsigned char **pstr; 63 char **pstr;
64 int *pint; 64 unsigned int *pint;
65 } localvar; 65 } localvar;
66}; 66};
67 67
@@ -71,74 +71,74 @@ typedef struct configoption configoption;
71struct formatstring 71struct formatstring
72{ 72{
73 formtstr id; 73 formtstr id;
74 unsigned char *idstring; 74 char *idstring;
75 unsigned char *formatstr; 75 char *formatstr;
76}; 76};
77typedef struct formatstring formatstring; 77typedef struct formatstring formatstring;
78 78
79/* static tmpstr in all modules */ 79/* static tmpstr in all modules */
80#define TMPSTRSIZE 1024 80#define TMPSTRSIZE 1024
81static unsigned char tmpstr[TMPSTRSIZE]; 81static char tmpstr[TMPSTRSIZE];
82 82
83extern unsigned char *nick; 83extern char *nick;
84extern int chan; 84extern int chan;
85 85
86extern unsigned int loggedin; 86extern unsigned int loggedin;
87 87
88/* vchat-client.c */ 88/* vchat-client.c */
89#define ERRSTRSIZE 1024 89#define ERRSTRSIZE 1024
90extern unsigned char errstr[]; 90extern char errstr[];
91extern unsigned char *vchat_cl_version; 91extern char *vchat_cl_version;
92void cleanup(int signal); 92void cleanup(int signal);
93 93
94/* configuration helper funktions from vchat-client.c */ 94/* configuration helper funktions from vchat-client.c */
95unsigned char *getformatstr (formtstr id); 95char *getformatstr (formtstr id);
96unsigned char *getstroption (confopt option); 96char *getstroption (confopt option);
97void setstroption (confopt option, unsigned char *string); 97void setstroption (confopt option, char *string);
98int getintoption (confopt option); 98int getintoption (confopt option);
99void setintoption (confopt option, int value); 99void setintoption (confopt option, int value);
100 100
101/* vchat-user.c */ 101/* vchat-user.c */
102extern unsigned char *vchat_us_version; 102extern char *vchat_us_version;
103 103
104/* add / delete user */ 104/* add / delete user */
105void ul_add (unsigned char *nick, int ignored); 105void ul_add (char *nick, int ignored);
106void ul_del (unsigned char *nick, int ignored); 106void ul_del (char *nick, int ignored);
107 107
108/* clear userlist */ 108/* clear userlist */
109void ul_clear (); 109void ul_clear ();
110 110
111/* channel join / leave */ 111/* channel join / leave */
112void ul_join (unsigned char *nick, int channel); 112void ul_join (char *nick, int channel);
113void ul_leave (unsigned char *nick, int channel); 113void ul_leave (char *nick, int channel);
114 114
115/* nickchange */ 115/* nickchange */
116void ul_nickchange (unsigned char *oldnick, unsigned char *newnick); 116void ul_nickchange (char *oldnick, char *newnick);
117 117
118/* place user in channel */ 118/* place user in channel */
119void ul_moveuser (unsigned char *nick, int channel); 119void ul_moveuser (char *nick, int channel);
120 120
121/* message nick completion */ 121/* message nick completion */
122void ul_msgto (unsigned char *nick); 122void ul_msgto (char *nick);
123void ul_msgfrom (unsigned char *nick); 123void ul_msgfrom (char *nick);
124 124
125/* nick-completion for vchat-ui.c */ 125/* nick-completion for vchat-ui.c */
126unsigned char *ul_nickcomp (const unsigned char *text, int state); 126char *ul_nickcomp (const char *text, int state);
127unsigned char *ul_cnickcomp (const unsigned char *text, int state); 127char *ul_cnickcomp (const char *text, int state);
128unsigned char *ul_mnickcomp (const unsigned char *text, int state); 128char *ul_mnickcomp (const char *text, int state);
129 129
130/* try to find user by substring */ 130/* try to find user by substring */
131unsigned char *ul_matchuser ( unsigned char *substr); 131char *ul_matchuser (char *substr);
132 132
133/* vchat-ui.c */ 133/* vchat-ui.c */
134extern unsigned char *vchat_ui_version; 134extern char *vchat_ui_version;
135 135
136/* topic and console strings */ 136/* topic and console strings */
137#define TOPICSTRSIZE 1024 137#define TOPICSTRSIZE 1024
138#define CONSOLESTRSIZE 1024 138#define CONSOLESTRSIZE 1024
139extern unsigned char topicstr[]; 139extern char topicstr[];
140extern unsigned char consolestr[]; 140extern char consolestr[];
141extern unsigned char *encoding; 141extern char *encoding;
142 142
143/* init / exit functions */ 143/* init / exit functions */
144void initui (void); 144void initui (void);
@@ -148,22 +148,20 @@ void exitui (void);
148void userinput (void); 148void userinput (void);
149 149
150/* display various messages */ 150/* display various messages */
151int writechan (unsigned char *str); 151int writechan (char *str);
152int writepriv (unsigned char *str, int maybeep ); 152int writepriv (char *str, int maybeep );
153void writeout (unsigned char *str); 153void writeout (char *str);
154void showout (void); 154void showout (void);
155void flushout (void); 155void flushout (void);
156#define msgout(STR) {flushout();writeout(STR);showout();} 156#define msgout(STR) {flushout();writeout(STR);showout();}
157void hideout (void); 157void hideout (void);
158int writecf (formtstr id, unsigned char *str); 158int writecf (formtstr id, char *str);
159void writelog (FILE *file);
160void writelog_i(FILE *file);
161 159
162extern int outputcountdown; 160extern int outputcountdown;
163 161
164/* update console / topic window */ 162/* update console / topic window */
165void consoleline (unsigned char *); 163void consoleline (char *);
166void topicline (unsigned char *); 164void topicline (char *);
167 165
168/* prompt for nick or password */ 166/* prompt for nick or password */
169void nickprompt (void); 167void nickprompt (void);
@@ -172,40 +170,42 @@ int passprompt (char *buf, int size, int rwflag, void *userdata);
172/* filter functions */ 170/* filter functions */
173void refilterscrollback( void); 171void refilterscrollback( void);
174 172
175unsigned int addfilter ( char colour, unsigned char *regex ); 173unsigned int addfilter ( char colour, char *regex );
176void removefilter ( unsigned char *line ); 174void removefilter ( char *line );
177void listfilters ( void ); 175void listfilters ( void );
178void clearfilters ( char colour ); 176void clearfilters ( char colour );
179 177
178void handlequery ( char *line );
179
180/* vchat-protocol.c */ 180/* vchat-protocol.c */
181extern unsigned char *vchat_io_version; 181extern char *vchat_io_version;
182 182
183/* connect/disconnect */ 183/* connect/disconnect */
184int vcconnect (unsigned char *server, unsigned char *port); 184int vcconnect (char *server, char *port);
185void vcdisconnect (); 185void vcdisconnect ();
186 186
187/* network I/O */ 187/* network I/O */
188void networkinput (void); 188void networkinput (void);
189void networkoutput (unsigned char *); 189void networkoutput (char *);
190 190
191/* helpers for vchat-user.c */ 191/* helpers for vchat-user.c */
192void ownjoin (int channel); 192void ownjoin (int channel);
193void ownleave (int channel); 193void ownleave (int channel);
194void ownnickchange (unsigned char *newnick); 194void ownnickchange (char *newnick);
195 195
196/* vchat-commands.c */ 196/* vchat-commands.c */
197extern unsigned char *vchat_cm_version; 197extern char *vchat_cm_version;
198void command_version ( unsigned char *tail); 198void command_version ( char *tail);
199 199
200/* user input */ 200/* user input */
201void handleline (unsigned char *); 201void handleline (char *);
202 202
203/* struct for defining "/command" handlers */ 203/* struct for defining "/command" handlers */
204typedef struct { 204typedef struct {
205 int number; 205 int number;
206 unsigned char name[8]; 206 char name[8];
207 int len; 207 int len;
208 void (*handler)(unsigned char *); 208 void (*handler)(char *);
209 unsigned char *short_help; 209 char *short_help;
210 unsigned char *help; 210 char *help;
211} commandentry; 211} commandentry;