Seeding from the 1.2 tree.

This commit is contained in:
Dan Mashal
2013-01-01 03:00:55 -08:00
parent d8c87c4ded
commit 87b806a563
1424 changed files with 260320 additions and 0 deletions

58
include/PMbitchx.h Normal file
View File

@@ -0,0 +1,58 @@
/* PM specific stuff */
#ifndef PM_BitchX_h
#define PM_BitchX_h
#define FONTDIALOG 256
#define LB_FONTLIST 101
#define CB_DEFAULT 102
#define CB_CHANGEFORALL 103
#define IDM_LOGO 355
#define IDM_MAINMENU 356
/* Properties book */
#define PROPNBK 357
#define ID_PROP 359
#define PB_DISMISS 360
#define NBKP_SETS1 362
#define SPB_SETS 363
#define SETS1 364
#define EF_ENTRY1 365
#define CB_ONOFF1 366
#define NBKP_OSSETTINGS 367
#define NBKP_SETS2 368
#define SETS2 369
#define EF_ENTRY2 370
#define CB_ONOFF2 371
#define NBKP_SETS3 372
#define SETS3 373
#define EF_ENTRY3 374
#define CB_ONOFF3 375
#define NBKP_SETS4 376
#define SETS4 377
#define EF_ENTRY4 378
#define CB_ONOFF4 379
#define CB_LFN 380
#define CB_SOUND 381
void pm_resize(Screen *this_screen);
void pm_clrscr(Screen *tmp);
void load_default_font(Screen *font_screen);
void pm_new_window(Screen *new, Window *win);
void pm_seticon(Screen *screen);
void wm_process(int param);
MRESULT EXPENTRY GenericWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
MRESULT EXPENTRY FrameWndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
MenuStruct *findmenu(char *menuname);
#define QWP_USER 0
/* Not sure how to decide this */
#define MMPM 1
#endif

146
include/alias.h Normal file
View File

@@ -0,0 +1,146 @@
/*
* alias.h: header for alias.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: alias.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef _ALIAS_H_
#define _ALIAS_H_
#include "irc_std.h"
#define DCC_STRUCT 0
#define USERLIST_STRUCT 1
#define NICK_STRUCT 2
#define SERVER_STRUCT 3
extern BuiltInDllFunctions *dll_functions;
/*
* XXXX - These need to go away
*/
#define COMMAND_ALIAS 0
#define VAR_ALIAS 1
#define VAR_ALIAS_LOCAL 2
/*
* These are the user commands. Dont call these directly.
*/
extern void aliascmd (char *, char *, char *, char *);
extern void assigncmd (char *, char *, char *, char *);
extern void localcmd (char *, char *, char *, char *);
extern void stubcmd (char *, char *, char *, char *);
extern void dumpcmd (char *, char *, char *, char *);
extern void add_var_alias (char *, char *);
extern void add_local_alias (char *, char *);
/*extern void add_cmd_alias (char *, char *);*/
extern void add_var_stub_alias (char *, char *);
extern void add_cmd_stub_alias (char *, char *);
extern char * get_variable (char *);
extern char ** glob_cmd_alias (char *, int *);
extern char * get_cmd_alias (char *, int *, char **, void **);
extern char ** get_subarray_elements (char *, int *, int);
/* These are in expr.c */
/*
* This function is a general purpose interface to alias expansion.
* The second argument is the text to be expanded.
* The third argument are the command line expandoes $0, $1, etc.
* The fourth argument is a flag whether $0, $1, etc are used
* The fifth argument, if set, controls whether only the first "command"
* will be expanded. If set, this argument will be set to the "rest"
* of the commands (after the first semicolon, or the null). If NULL,
* then the entire text will be expanded.
*/
extern char * BX_expand_alias (const char *, const char *, int *, char **);
/*
* This is the interface to the "expression parser"
* The first argument is the expression to be parsed
* The second argument is the command line expandoes ($0, $1, etc)
* The third argument will be set if the command line expandoes are used.
*/
extern char * BX_parse_inline (char *, const char *, int *);
/*
* This function is used to call a user-defined function.
* Noone should be calling this directly except for call_function.
*/
extern char * call_user_function (char *, char *);
extern void call_user_alias (char *, char *, char *, void *);
/*
* This function is sued to save all the current aliases to a global
* file. This is used by /SAVE and /ABORT.
*/
extern void save_aliases (FILE *, int);
extern void save_assigns (FILE *, int);
/*
* This function is in functions.c
* This function allows you to execute a primitive "BUILT IN" expando.
* These are the $A, $B, $C, etc expandoes.
* The argument is the character of the expando (eg, 'A', 'B', etc)
*
* This is in functions.c
*/
extern char * built_in_alias (char, int *);
/* BOGUS */
/*
* This function is used by parse_command to directly execute an alias.
* Noone should be calling this function directly. (call parse_line.)
*/
/*extern void execute_alias (char *, char *, char *);*/
void prepare_alias_call (void *, char **);
void destroy_alias_call (void *);
/*
* This is in functions.c
* This is only used by next_unit and expand_alias to call built in functions.
* Noone should call this function directly.
*/
extern char * call_function (char *, const char *, int *);
/*
* These are the two primitives for runtime stacks.
*/
extern void BX_make_local_stack (char *);
extern void BX_destroy_local_stack (void);
extern void set_current_command (char *);
extern void bless_local_stack (void);
extern void unset_current_command (void);
extern void dump_call_stack (void);
extern void panic_dump_call_stack (void);
extern void BX_lock_stack_frame (void);
extern void BX_unlock_stack_frame (void);
extern void destroy_aliases (int);
Alias *find_var_alias (char *);
void delete_var_alias (char *, int);
char *parse_line_with_return (char *, char *, char *, int, int);
/*
* This is the alias interface to the /STACK command.
*/
extern void do_stack_alias (int, char *, int);
char *BX_next_unit (char *, const char *, int *, int);
char *BX_alias_special_char(char **buffer, char *ptr, const char *args, char *quote_em, int *args_flag);
#endif /* _ALIAS_H_ */

116
include/alist.h Normal file
View File

@@ -0,0 +1,116 @@
/*
* alist.h -- resizeable arrays
* Copyright 1997 EPIC Software Labs
*/
#ifndef __alist_h__
#define __alist_h__
#include "irc.h"
#include "ircaux.h"
/*
* Anyone have any ideas how to optimize this further?
*/
#ifdef _cs_alist_hash_
static __inline u_32int_t cs_alist_hash (const char *s, u_32int_t *mask)
{
u_32int_t x;
if (s[0] == 0)
{
x = 0;
*mask = 0;
}
else if (s[1] == 0)
{
x = (s[0] << 24);
*mask = 0xff000000;
}
else if (s[2] == 0)
{
x = (s[0] << 24) | (s[1] << 16);
*mask = 0xffff0000;
}
else
{
x = (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3];
*mask = 0xffffff00 | (s[3] ? 0xff : 0x00);
}
return x;
}
#endif
#ifdef _ci_alist_hash_
static __inline u_32int_t ci_alist_hash (const char *s, u_32int_t *mask)
{
u_32int_t x;
if (s[0] == 0)
{
x = 0;
*mask = 0;
}
else if (s[1] == 0)
{
x = (stricmp_table[(int)s[0]] << 24);
*mask = 0xff000000;
}
else if (s[2] == 0)
{
x = (stricmp_table[(int)s[0]] << 24) | (stricmp_table[(int)s[1]] << 16);
*mask = 0xffff0000;
}
else
{
x = (stricmp_table[(int)s[0]] << 24) | (stricmp_table[(int)s[1]] << 16) | (stricmp_table[(int)s[2]] << 8) | stricmp_table[(int)s[3]];
*mask = 0xffffff00 | (s[3] ? 0xff : 0x00);
}
return x;
}
#endif
/*
* Everything that is to be filed with this system should have an
* identifying name as the first item in the struct.
*/
typedef struct
{
char *name;
u_32int_t hash;
} Array_item;
typedef int (*alist_func) (const char *, const char *, size_t);
typedef enum {
HASH_INSENSITIVE,
HASH_SENSITIVE
} hash_type;
/*
* This is the actual list, that contains structs that are of the
* form described above. It contains the current size and the maximum
* size of the array.
*/
typedef struct
{
Array_item **list;
int max;
int total_max;
alist_func func;
hash_type hash;
} Array;
Array_item *BX_add_to_array (Array *, Array_item *);
Array_item *BX_remove_from_array (Array *, char *);
Array_item *BX_array_pop (Array *, int);
Array_item *BX_remove_all_from_array (Array *, char *);
Array_item *BX_array_lookup (Array *, char *, int wild, int delete);
Array_item *BX_find_array_item (Array *, char *, int *cnt, int *loc);
void *BX_find_fixed_array_item (void *Array, size_t size, int siz, char *, int *cnt, int *loc);
#endif

38
include/array.h Normal file
View File

@@ -0,0 +1,38 @@
/*
* IRC-II (C) 1990, 1995 Michael Sandroff, Matthew Green
* This file (C) 1993, 1995 Aaron Gifford and Jeremy Nelson
*
* array.h -- header file for array.c
* See the COPYRIGHT file for copyright information
*
*/
#ifndef ARRAY_H
#define ARRAY_H
#include "irc_std.h"
BUILT_IN_FUNCTION(function_indextoitem);
BUILT_IN_FUNCTION(function_itemtoindex);
BUILT_IN_FUNCTION(function_igetitem);
BUILT_IN_FUNCTION(function_getitem);
BUILT_IN_FUNCTION(function_setitem);
BUILT_IN_FUNCTION(function_finditem);
BUILT_IN_FUNCTION(function_matchitem);
BUILT_IN_FUNCTION(function_rmatchitem);
BUILT_IN_FUNCTION(function_getmatches);
BUILT_IN_FUNCTION(function_getrmatches);
BUILT_IN_FUNCTION(function_delitem);
BUILT_IN_FUNCTION(function_numitems);
BUILT_IN_FUNCTION(function_getarrays);
BUILT_IN_FUNCTION(function_numarrays);
BUILT_IN_FUNCTION(function_delarray);
BUILT_IN_FUNCTION(function_ifinditem);
BUILT_IN_FUNCTION(function_ifindfirst);
BUILT_IN_FUNCTION(function_listarray);
BUILT_IN_FUNCTION(function_gettmatch);
BUILT_IN_FUNCTION(function_igetmatches);
BUILT_IN_FUNCTION(function_igetrmatches);
void delete_all_arrays(void);
#endif

86
include/bsdglob.h Normal file
View File

@@ -0,0 +1,86 @@
/*
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)glob.h 8.1 (Berkeley) 6/2/93
* $Id: bsdglob.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef _GLOB_H_
#define _GLOB_H_
struct stat;
typedef struct {
int gl_pathc; /* Count of total paths so far. */
int gl_matchc; /* Count of paths matching pattern. */
int gl_offs; /* Reserved at beginning of gl_pathv. */
int gl_flags; /* Copy of flags parameter to glob. */
char **gl_pathv; /* List of paths matching pattern. */
/* Copy of errfunc parameter to glob. */
int (*gl_errfunc) (const char *, int);
/*
* Alternate filesystem access methods for glob; replacement
* versions of closedir(3), readdir(3), opendir(3), stat(2)
* and lstat(2).
*/
void (*gl_closedir) (void *);
struct dirent *(*gl_readdir) (void *);
void *(*gl_opendir) (const char *);
int (*gl_lstat) (const char *, struct stat *);
int (*gl_stat) (const char *, struct stat *);
} glob_t;
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
#define GLOB_ERR 0x0004 /* Return on error. */
#define GLOB_MARK 0x0008 /* Append / to matching directories. */
#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */
#define GLOB_NOSORT 0x0020 /* Don't sort. */
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */
#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */
#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */
#define GLOB_INSENSITIVE 0x1000 /* Don't worry about upper versus lower case */
#define GLOB_NOSPACE (-1) /* Malloc call failed. */
#define GLOB_ABEND (-2) /* Unignored error. */
int BX_bsd_glob (const char *, int, int (*)(const char *, int), glob_t *);
void BX_bsd_globfree (glob_t *);
#endif /* !_GLOB_H_ */

69
include/cdcc.h Normal file
View File

@@ -0,0 +1,69 @@
#ifndef _CDCC_H_
#define _CDCC_H_
#include <sys/types.h>
#include <sys/stat.h>
/* local commands */
extern double cdcc_minspeed;
typedef struct {
char *name;
int (*function)(char *args, char *rest);
char *help;
} local_cmd;
/* remote commands */
typedef struct {
char *name;
int (*function)(char *from, char *args);
char *help;
} remote_cmd;
/* offer pack type */
typedef struct packtype {
struct packtype *next;
int num;
char *file;
char *desc;
char *notes;
int numfiles;
int gets;
int server;
time_t timeadded;
unsigned long size;
double minspeed;
char *password;
} pack;
/* cdcc queue struct */
typedef struct queuetype {
struct queuetype *next;
char *nick;
char *file;
int numfiles;
time_t time;
char *desc;
char *command;
int num;
int server;
} queue;
/* local command parser */
void cdcc(char *, char *, char *, char *);
/* remote message command parser */
char *msgcdcc(char *, char *, char *);
/* send a file from the queue */
void dcc_sendfrom_queue (void);
void cdcc_timer_offer (void);
/* publicly list offered packs */
int l_plist(char *, char *);
int BX_get_num_queue(void);
int BX_add_to_queue(char *, char *, pack *);
#endif

93
include/cdns.h Normal file
View File

@@ -0,0 +1,93 @@
/* $Id: cdns.h 3 2008-02-25 09:49:14Z keaston $ */
/*
* cdns.h: header for cdns.c
*/
#ifndef _CDNS_H_
#define _CDNS_H_
/* We gotta know about the fd_set type, so we gonna inclue this */
#include "irc.h"
#include "struct.h"
#include "newio.h"
#endif
#define MAXALIASES 35
#define MAXADDRS 35
typedef struct _hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct in_addr h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
} my_hostent;
typedef struct dns_struct {
/* 'in': This is the string we want to resolve. It can be
* either a host or ip. The string WILL be malloc'ed by
* the "add" function. Do NOT malloc or free this variable!
*/
char *in;
/* 'out': This is our "resolved" string. It can be
* either a host or ip. The string WILL be malloc'ed by
* the internal resolver. Do NOT malloc or free this variable!
*/
char *out;
/* alias: this is passed to the alias parser which then interpret's
* the output.
*/
char *alias;
/* 'callback': This is our callback function. When our 'in' gets
* resolved, we will call this function, with this structure
* as our parameter. Do NOT malloc or free this variable.
*/
void (*callback) (struct dns_struct *); /* Our callback function */
/* 'callinfo': This allows us to store information that you might
* need for later use when in your 'callback' function. This is
* just a void pointer, so you MUST malloc any of the data you want to
* store here. Once you are done with this variable, you must
* free it!!! BEWARE BEWARE, YOU MUST FREE THIS VARIABLE YOURSELF!
*/
void *callinfo;
/* 'ip': Internally used, to find out what the 'out' variable is.
* ie, is it a host, or is it ip
*/
int ip;
/* hostentr: A copy of the hostent structure returned from the
* name server. I am adding it here to extend the ability to
* read multiple IPs. Although this is not generally necessary.
* - Brian Smith
*/
my_hostent *hostentr;
/* 'next': Internally used. our "next" pointer. */
struct dns_struct *next;
} DNS_QUEUE;
void start_dns(void);
void stop_dns(void);
void kill_dns(void);
void set_dns_output_fd(fd_set *);
void dns_check(fd_set *);
void check_dns_queue(void);
void add_to_dns_queue(char *, void (*) (DNS_QUEUE *), char *, void *, int);
my_hostent *duphostent(struct hostent *orig);
void freemyhostent(my_hostent *freeme);
#define DNS_URGENT 1
#define DNS_NORMAL 2
#define Q_NEXT(tmp) ((tmp)->next)
#define Q_OPEN(headp, tailp) (*(headp) = *(tailp) = NULL)

67
include/cdrom.h Normal file
View File

@@ -0,0 +1,67 @@
#ifndef __cdrom_h_
#define __cdrom_h_
#ifndef __FreeBSD__
#include <mntent.h>
#else
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <sys/file.h>
#include <sys/cdio.h>
#endif /* __FreeBSD__ */
#include <sys/ioctl.h>
#include <signal.h>
#include <fcntl.h>
#ifndef __FreeBSD__
#include <linux/cdrom.h>
#include <linux/errno.h>
#endif
#ifndef MODULE_CDROM
extern void set_cd_device (Window *, char *, int);
extern void cd_stop (char *, char *, char *, char *);
extern void cd_eject (char *, char *, char *, char *);
extern void cd_play (char *, char *, char *, char *);
extern void cd_list (char *, char *, char *, char *);
extern void cd_volume (char *, char *, char *, char *);
extern void cd_pause (char *, char *, char *, char *);
extern void cd_help (char *, char *, char *, char *);
#endif
#ifndef __FreeBSD__
struct cdrom_etocentry
{
u_char cdte_track;
u_char cdte_adr :4;
u_char cdte_ctrl :4;
u_char cdte_format;
union cdrom_addr cdte_addr;
u_char cdte_datamode;
int avoid;
int length;
int m_length;
int m_start;
};
#else
struct cdrom_etocentry
{
u_char m_length;
u_char m_start;
int avoid;
};
#define CDROMSTOP CDIOCSTOP
#define CDROMEJECT CDIOCEJECT
#define CDROMREADTOCHDR CDIOREADTOCHEADER
#define CDROMVOLCTRL CDIOCSETVOL
#define CDROMPAUSE CDIOCPAUSE
#define CDROMRESUME CDIOCRESUME
#define CDROMVOLREAD CDIOCGETVOL
#endif /* __FreeBSD__ */
#endif /* cdrom.h */

12
include/chelp.h Normal file
View File

@@ -0,0 +1,12 @@
/*
* Written and CopyRight by Colten Edwards 03-09-96
*
*
*/
#ifndef __chelp_h
#define __chelp_h
extern void chelp (char *, char *, char *, char *);
#endif

900
include/color.h Normal file
View File

@@ -0,0 +1,900 @@
#ifndef _INC_COLOR
#define _INC_COLOR
/*
* DEFAULT_DOUBLE STATUS can be defined as 0 or 1
* 0 makes the status line be 1 line only. 1 makes it 2 lines
* this will be the default for all created windows.
* DEFAULT_STATUS_LINES can be defined as 0 or 1
* 0 is off, and 1 makes the window split the default for ALL windows.
* a window split is the topic bar.
*/
#define NO_NUMERICS_STR "-:-"
#ifdef HUMBLE
#define DEFAULT_FORMAT_381_FSET "%K>%n>%W> You are now an %GIRC%n whore"
#define DEFAULT_FORMAT_391_FSET NULL
#define DEFAULT_FORMAT_471_FSET "$G $1 :Sorry, cannot join channel. %K(%WChannel is full%K)%n"
#define DEFAULT_FORMAT_473_FSET "$G $1 :Sorry, cannot join channel. %K(%WInvite only channel%K)%n"
#define DEFAULT_FORMAT_474_FSET "$G $1 :Sorry, cannot join channel. %K(%WBanned from channel%K)%n"
#define DEFAULT_FORMAT_475_FSET "$G $1 :Sorry, cannot join channel. %K(%WBad channel key%K)%n"
#define DEFAULT_FORMAT_476_FSET "$G $1 :%K(%WYou are not opped%K)%n"
/* Done ACTION */
#ifdef ONLY_STD_CHARS
#define DEFAULT_FORMAT_ACTION_FSET "%@%K* %W$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_AR_FSET "%@%K* %Y$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_CHANNEL_FSET "%@%K* %W$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_OTHER_FSET "%@%K* %c$3%K>%W$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_OTHER_AR_FSET "%@%K* %c$3%K>%Y$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_USER_FSET "%@%K* %c$3%K>%W$1 %n$4-"
#define DEFAULT_FORMAT_ACTION_USER_AR_FSET "%@%K* %c$3%K>%Y$1 %n$4-"
#else /* ONLY_STD_CHARS */
#define DEFAULT_FORMAT_ACTION_FSET ansi?"%@%K<> %W$1 %n$4-":"%@<02> $1 $4-"
#define DEFAULT_FORMAT_ACTION_AR_FSET ansi?"%@%K<> %Y$1 %n$4-":"%@<02> $1 $4-"
#define DEFAULT_FORMAT_ACTION_CHANNEL_FSET ansi?"%@%K<> %W$1 %n$4-":"%@<02> $1 $4-"
#define DEFAULT_FORMAT_ACTION_OTHER_FSET ansi?"%@%K<> %c$3%K>%W$1 %n$4-":"%@<02> $3>$1 $4-"
#define DEFAULT_FORMAT_ACTION_OTHER_AR_FSET ansi?"%@%K<> %c$3%K>%Y$1 %n$4-":"%@<02> $3>$1 $4-"
#define DEFAULT_FORMAT_ACTION_USER_FSET ansi?"%@%K<> %c$3%K>%W$1 %n$4-":"%@<02> $3>$1 $4-"
#define DEFAULT_FORMAT_ACTION_USER_AR_FSET ansi?"%@%K<> %c$3%K>%Y$1 %n$4-":"%@<02> $3>$1 $4-"
#endif /* ONLY_STD_CHARS */
/* Done ALIAS, ASSIGN */
#define DEFAULT_FORMAT_ALIAS_FSET "$G %K$tolower($[10]0)%w $1-"
#define DEFAULT_FORMAT_ASSIGN_FSET "$G %K$tolower($[10]0)%w $1-"
#define DEFAULT_FORMAT_AWAY_FSET "is away: ($3-) $1 $2"
#define DEFAULT_FORMAT_BACK_FSET "is back from the dead. Gone $1 hrs $2 min $3 secs"
/* Done BANS */
#define DEFAULT_FORMAT_BANS_HEADER_FSET "# Channel SetBy Sec Ban"
#define DEFAULT_FORMAT_BANS_FSET "%W$[-2]0%K:%n $[26]2 %K(%c$[20]3%K:%c$[24]4-%K)"
#define DEFAULT_FORMAT_BANS_FOOTER_FSET "%K[ %nEnd of channel %W$0 %K- %W$1 %nbans counted %K]"
#define DEFAULT_FORMAT_EBANS_HEADER_FSET "# Channel SetBy Sec ExemptBan"
#define DEFAULT_FORMAT_EBANS_FSET "%W$[-2]0%K:%n $[26]2 %K(%c$[20]3%K:%c$[24]4-%K)"
#define DEFAULT_FORMAT_EBANS_FOOTER_FSET "%K[ %nEnd of channel %W$0 %K- %W$1 %nexemptbans counted %K]"
#define DEFAULT_FORMAT_BITCH_FSET "%RBitch Mode Activated%n $1 $4 $5 on $3"
#define DEFAULT_FORMAT_BOT_HEADER_FSET "Aop Prot Bot Channel Hostname"
#define DEFAULT_FORMAT_BOT_FOOTER_FSET "There are $1 on the BotList"
#define DEFAULT_FORMAT_BOT_FSET "$[2]0 $[2]1 $[11]2 $[10]3 $4"
#define DEFAULT_FORMAT_BWALL_FSET "%K[%cWallOp%K/%c$2%K] %n$4-"
#define DEFAULT_FORMAT_CHANNEL_SIGNOFF_FSET "$G %nSignOff%K: %W$1 %K(%n$4-%K)"
#define DEFAULT_FORMAT_CHANNEL_URL_FSET "$G URL for %c$1%K:%n $2-"
#define DEFAULT_FORMAT_CONNECT_FSET "$G Connecting to server $1/%c$2%n"
/* Done CTCP */
#define DEFAULT_FORMAT_CTCP_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4 from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4 from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FUNC_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4 from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FUNC_USER_FSET " %K>%n>%W> %C$1 %K[%c$2%K]%c requested $4 from you"
#define DEFAULT_FORMAT_CTCP_CLOAK_UNKNOWN_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested unknown ctcp $4 from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_UNKNOWN_USER_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested unknown ctcp $4 from you"
#define DEFAULT_FORMAT_CTCP_CLOAK_USER_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4 from you"
#define DEFAULT_FORMAT_CTCP_FUNC_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4 from $3"
#define DEFAULT_FORMAT_CTCP_FUNC_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4 from you"
#define DEFAULT_FORMAT_CTCP_UNKNOWN_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested unknown ctcp $4 from $3"
#define DEFAULT_FORMAT_CTCP_UNKNOWN_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested unknown ctcp $4 from you"
#define DEFAULT_FORMAT_CTCP_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4 from you"
#define DEFAULT_FORMAT_CTCP_REPLY_FSET "$G %nCTCP %W$3 %nreply from %n$1: $4-"
/* Done DCC */
#define DEFAULT_FORMAT_DCC_CHAT_FSET "%K[%G$1%K(%gdcc%K)] %n$3-"
#define DEFAULT_FORMAT_DCC_CHAT_AR_FSET "%K[%Y$1%K(%Ydcc%K)] %n$3-"
#define DEFAULT_FORMAT_DCC_CONNECT_FSET "$G DCC $1 %nconnection with %W$2%K[%c$4 $5%K]%n established"
#define DEFAULT_FORMAT_DCC_ERROR_FSET "$G %rDCC lost %w$1%w %rto $2 %K[%w$3-%K]"
#define DEFAULT_FORMAT_DCC_LOST_FSET "$G %nDCC %W$1%n:%g$2%n %K[%C$3%K]%n $4 $5 completed in $6 secs %K(%W$7 kb/sec%K)"
#define DEFAULT_FORMAT_DCC_REQUEST_FSET "$G DCC $1 %K(%n$2 $3%K)%n request from %W$4%K[%c$5:$6%K]"
#define DEFAULT_FORMAT_DESYNC_FSET "$G $1 is desynced from $2 at $0"
#define DEFAULT_FORMAT_DISCONNECT_FSET "$G Use %G/Server%n to connect to a server"
#define DEFAULT_FORMAT_ENCRYPTED_NOTICE_FSET "%K-%Y$1%K(%p$2%K)-%n $3-"
#define DEFAULT_FORMAT_ENCRYPTED_PRIVMSG_FSET "%K[%Y$1%K(%p$2%K)]%n $3-"
#define DEFAULT_FORMAT_FLOOD_FSET "%Y$1%n flood detected from %G$2%K(%g$3%K)%n on %K[%G$4%K]"
#define DEFAULT_FORMAT_FRIEND_JOIN_FSET "$G %R$1 %K[%c$2%K]%n has joined $3"
#define DEFAULT_FORMAT_HELP_FSET "$0-"
#define DEFAULT_FORMAT_HOOK_FSET "$0-"
#define DEFAULT_FORMAT_INVITE_FSET "%K>%n>%W> $1 Invites You to $2-"
#define DEFAULT_FORMAT_INVITE_USER_FSET "%K>%n>%W> Inviting $1 to $2-"
/* Done JOIN, LEAVE, KICK, KILL */
#define DEFAULT_FORMAT_JOIN_FSET "$G %C$1 %K[%c$2%K]%n has joined $3"
#define DEFAULT_FORMAT_LEAVE_FSET "$G $1 %K[%w$2%K]%n has left $3-"
#define DEFAULT_FORMAT_KICK_FSET "$G %n$3 was kicked off $2 by %c$1 %K(%n$4-%K)"
#define DEFAULT_FORMAT_KICK_USER_FSET "$G %WYou%n have been kicked off $2 by %c$1 %K(%n$4-%K)"
#define DEFAULT_FORMAT_KILL_FSET "$G %WYou%n have been killed by $1 for $2-"
/* Done LINKS */
#define DEFAULT_FORMAT_LINKS_FSET "$G %K[%c$[-3]0%K] [%c$[-3]3%K] [%n$[-27]1%K]%n <- %K[%n$[-27]2%K]"
#define DEFAULT_FORMAT_LINKS_HEADER_FSET "$G %K[%cNum%K] [%cHop%K] [%cServer%K] [%cUplink%K]"
/* Done LIST */
#define DEFAULT_FORMAT_LIST_FSET "$G $[12]1 $[-5]2 $[50]3-"
#define DEFAULT_FORMAT_MAIL_FSET "%K>%n>%W> You've got mail!@#"
#define DEFAULT_FORMAT_MSGCOUNT_FSET "[$0-]"
#define DEFAULT_FORMAT_MSGLOG_FSET "[$[8]0] [$1] - $2-"
/* Done MODE SMODE MODE_CHANNEL */
#define DEFAULT_FORMAT_MODE_FSET "$G %nmode%K/%c$3 %K[%W$4-%K]%n by %W$1"
#define DEFAULT_FORMAT_SMODE_FSET "$G %nmodehack%K/%c$2 %K[%W$3-%K]%n by %W$1"
#define DEFAULT_FORMAT_MODE_CHANNEL_FSET "$G %nmode%K/%c$3 %K[%W$4-%K]%n by %W$1"
/* Done MSG */
#define DEFAULT_FORMAT_MSG_FSET "%K[%P$1%K(%p$2%K)]%n $3-"
#define DEFAULT_FORMAT_MSG_AR_FSET "%K[%Y$1%K(%Y$2%K)]%n $3-"
#define DEFAULT_FORMAT_OPER_FSET "%C$1 %K[%c$2%K]%n )s now %Wan%w %GIRC%n whore"
#define DEFAULT_FORMAT_IGNORE_INVITE_FSET "%K>%n>%W> You have been invited to $1-"
#define DEFAULT_FORMAT_IGNORE_MSG_FSET "%K[%P$1%P$2%K(%p$3%K)]%n $4-"
#define DEFAULT_FORMAT_IGNORE_MSG_AWAY_FSET "%K[%P$1%P$2%K(%p$3%K)]%n $4-"
#define DEFAULT_FORMAT_IGNORE_NOTICE_FSET "%K-%P$2%K(%p$3%K)-%n $4-"
#define DEFAULT_FORMAT_IGNORE_WALL_FSET "%K%P$1%n $2-"
/* Done MSG */
#define DEFAULT_FORMAT_MSG_GROUP_FSET "%K-%P$1%K:%p$3%K-%n $4-"
#define DEFAULT_FORMAT_MSG_GROUP_AR_FSET "%K-%Y$1%K:%Y$3%K-%n $4-"
/* Done NAMES */
#define DEFAULT_FORMAT_NAMES_BANNER_FSET "$G "
#define DEFAULT_FORMAT_NAMES_FSET "$G %K[%cUsers%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_NONOP_FSET "$G %K[%cNonChanOps%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_OP_FSET "$G %K[%cChanOps%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_PROMPT_FSET "$G $0-"
#define DEFAULT_FORMAT_NAMES_VOICE_FSET "$G %K[%cVoiceUsers%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_NICK_FSET "%B$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_BOT_FSET "%G$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_FRIEND_FSET "%Y$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_ME_FSET "%W$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_SHIT_FSET "%R$[10]0"
#define DEFAULT_FORMAT_NAMES_USER_FSET "%K[ %n$1-%K]"
#define DEFAULT_FORMAT_NAMES_USER_CHANOP_FSET "%K[%C$0%n$1-%K]"
#define DEFAULT_FORMAT_NAMES_USER_IRCOP_FSET "%K[%R$0%n$1-%K]"
#define DEFAULT_FORMAT_NAMES_USER_VOICE_FSET "%K[%M$0%n$1-%K]"
/* In bx but not hades*/
#define DEFAULT_FORMAT_NAMES_BOT_FSET "$G %K[%cBots%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_FRIEND_FSET "$G %K[%cFriends%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_IRCOP_FSET "$G %K[%cIrcOps%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NAMES_SHIT_FSET "$G %K[%cShitUsers%K(%W$1%K:%W$2%K/%W$3%K)]%c $4"
#define DEFAULT_FORMAT_NETADD_FSET "$G %nAdded: %W$1 $2"
#define DEFAULT_FORMAT_NETSPLIT_FSET "$G %nNetsplit detected%K: %W$1%n split from %W$2 %K[%c$0%K]"
#define DEFAULT_FORMAT_NETJOIN_FSET "$G %nNetjoined%K: %W$1%n to %W$2"
/* nickname_fset not in hades*/
#define DEFAULT_FORMAT_NICKNAME_FSET "$G %W$1 %nis now known as %c$3"
#define DEFAULT_FORMAT_NICKNAME_OTHER_FSET "$G %W$1 %nis now known as %c$3"
#define DEFAULT_FORMAT_NICKNAME_USER_FSET "$G %WYou%K(%n$1%K)%n are now known as %c$3"
/* Done NONICK, no NONICK_FROM in bx */
#define DEFAULT_FORMAT_NONICK_FSET "$G %W$1%K:%n $3-"
/*#define DEFAULT_FORMAT_NONICK_FROM_FSET "$G %W$1%K:%n $3- %K[%Cfrom %c$2%K]"*/
#define DEFAULT_FORMAT_NOTE_FSET "($0) ($1) ($2) ($3) ($4) ($5-)"
#define DEFAULT_FORMAT_NOTICE_FSET "%K-%P$1%K-%n $2-"
#define DEFAULT_FORMAT_REL_FSET "%K[%rmsg->$1%K]%n $4-"
#define DEFAULT_FORMAT_RELN_FSET "-$1:$3- $4-"
#define DEFAULT_FORMAT_RELM_FSET "[$1($2)] $4-"
#define DEFAULT_FORMAT_RELS_FSET "[***] $0-"
#define DEFAULT_FORMAT_RELSN_FSET "-> [notice($1)] $2-"
#define DEFAULT_FORMAT_RELSM_FSET "-> [msg($1)] $2-"
#define DEFAULT_FORMAT_NOTIFY_SIGNOFF_FSET "$G %GSignoff%n by %r$1%K!%r$2%n at $0"
#define DEFAULT_FORMAT_NOTIFY_SIGNON_FSET "$G %GSignon%n by %R$1%K!%R$2%n at $0"
#define DEFAULT_FORMAT_PASTE_FSET "%K[%W$1%K]%n $2-"
/* Done PUBLIC */
#define DEFAULT_FORMAT_PUBLIC_FSET "%b<%n$1%b>%n $3-"
#define DEFAULT_FORMAT_PUBLIC_AR_FSET "%b<%Y$1%b>%n $3-"
#define DEFAULT_FORMAT_PUBLIC_MSG_FSET "%b(%n$1%K/%n$3%b)%n $4-"
#define DEFAULT_FORMAT_PUBLIC_MSG_AR_FSET "%b(%Y$1%K/%Y$3%b)%n $4-"
#define DEFAULT_FORMAT_PUBLIC_NOTICE_FSET "%K-%P$1%K:%p$3%K-%n $5-"
#define DEFAULT_FORMAT_PUBLIC_NOTICE_AR_FSET "%K-%Y$1%K:%Y$3%K-%n $5-"
#define DEFAULT_FORMAT_PUBLIC_OTHER_FSET "%b<%n$1%K:%n$2%b>%n $3-"
#define DEFAULT_FORMAT_PUBLIC_OTHER_AR_FSET "%b<%Y$1%K:%Y$2%b>%n $3-"
/* Done SEND */
#define DEFAULT_FORMAT_SEND_ACTION_FSET "%K<> %W$1 %n$3-"
#define DEFAULT_FORMAT_SEND_ACTION_OTHER_FSET "%K<> %n-> %c$2%K>%W$1 %n$3-"
#define DEFAULT_FORMAT_SEND_DCC_CHAT_FSET "%K[%rdcc%K(%R$1%K)] %n$2-"
#define DEFAULT_FORMAT_SEND_MSG_FSET "%K[%rmsg%K(%R$1%K)] %n$3-"
#define DEFAULT_FORMAT_SEND_NOTICE_FSET "%K[%rnotice%K(%R$1%K)] %n$3-"
#define DEFAULT_FORMAT_SEND_PUBLIC_FSET "%p<%n$2%p>%n $3-"
#define DEFAULT_FORMAT_SEND_PUBLIC_OTHER_FSET "%p<%n$2%K:%n$1%p>%n $3-"
/* Not in Hades*/
#define DEFAULT_FORMAT_SEND_AWAY_FSET "[Away ($strftime($1 %a %b %d %I:%M%p %Z))] [$tdiff2(${time() - u})] [BX-MsgLog $2]"
#define DEFAULT_FORMAT_SEND_CTCP_FSET "%K[%rctcp%K(%R$1%K)] %n$2"
#define DEFAULT_FORMAT_SEND_RCTCP_FSET "%K[%rrctcp%K(%R$1%K)] %n$2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K-%Y$1%K(%p$2%K)-%n $2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%Y$1%K(%p$2%K)]%n $2-"
#define DEFAULT_FORMAT_SERVER_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG1_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG1_FROM_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG2_FSET "$G%n $1-"
#define DEFAULT_FORMAT_SERVER_MSG2_FROM_FSET "$G%n $1-"
#define DEFAULT_FORMAT_SERVER_NOTICE_FSET "%K[%c***%K] %n$2-"
/*#define DEFAULT_FORMAT_SERVER_NOTICE_FSET "$2-"*/
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT_FSET "Possible bot: %C$1 %K[%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT1_FSET "Possible $1 bot: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT_ALARM_FSET "$1 alarm activated: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_CONNECT_FSET "Client Connecting: %C$1 %K[%c$2%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_EXIT_FSET "Client Exiting: %C$1 %K[%c$2-%K] %K[%c$3-%K]"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_INVALID_FSET "Invalid username: %C$1%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_TERM_FSET "Terminating client for excess flood %C$1%K [%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_FAKE_FSET "Fake Mode detected on $1 -> $2-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_FSET "Foreign OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_LOCAL_FSET "Local OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n for $3-"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET "%W$1%n added a new K-Line %K[%c$2%K]%n from $3 for $4-"
#define DEFAULT_FORMAT_SERVER_NOTICE_NICK_COLLISION_FSET "Nick collision %W$1%n killed %c$2%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_OPER_FSET "%C$1 %K[%c$2%K]%n is now %Wan%w %GIRC%n whore"
#define DEFAULT_FORMAT_SERVER_NOTICE_REHASH_FSET "%W$1%n is rehashing the Server config file"
#define DEFAULT_FORMAT_SERVER_NOTICE_STATS_FSET "Stats $1: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_TRAFFIC_HIGH_FSET "Entering high-traffic mode %K(%n$1 > $2-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_TRAFFIC_NORM_FSET "Resuming standard operation %K(%n$1 $2 $3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_UNAUTH_FSET "Unauthorized Connection from $1-"
#define DEFAULT_FORMAT_SET_FSET "$G %K$tolower($[27]0) %w$1-"
#define DEFAULT_FORMAT_CSET_FSET "%r$[-14]1 %R$[-20.]0 %w$2-"
#define DEFAULT_FORMAT_SET_NOVALUE_FSET "$G %K$tolower($0) has no value"
#define DEFAULT_FORMAT_SHITLIST_FSET " $[3]0 $[34]1 $[10]2 $3-"
#define DEFAULT_FORMAT_SHITLIST_FOOTER_FSET "There are $1 users on the shitlist"
#define DEFAULT_FORMAT_SHITLIST_HEADER_FSET " lvl nick!user@host channels reason"
#define DEFAULT_FORMAT_SIGNOFF_FSET "$G %nSignOff%K: %W$1 %K(%n$3-%K)"
#define DEFAULT_FORMAT_SILENCE_FSET "$G %RWe are $1 silencing $2 at $0"
#define DEFAULT_FORMAT_TRACE_OPER_FSET "%R$1%n %K[%n$3%K]"
#define DEFAULT_FORMAT_TRACE_SERVER_FSET "%R$1%n $2 $3 $4 %K[%n$5%K]%n $6-"
#define DEFAULT_FORMAT_TRACE_USER_FSET "%R$1%n %K[%n$3%K]"
#define DEFAULT_FORMAT_TIMER_FSET "$G $[-5]0 $[-10]1 $[-6]2 $3-"
/* Done TOPIC */
#define DEFAULT_FORMAT_TOPIC_FSET "$G Topic for %c$1%K:%n $2-"
#define DEFAULT_FORMAT_TOPIC_CHANGE_FSET "$G %W$1 %nhas changed the topic on channel %W$2%n to%K:%n $3-"
#define DEFAULT_FORMAT_TOPIC_SETBY_FSET "$G %nTopic set by %c$2%K [%c$stime($3) ago%K]"
#define DEFAULT_FORMAT_TOPIC_UNSET_FSET "$G %nTopic unset by $1 on $2"
#define DEFAULT_FORMAT_USAGE_FSET "$G Usage: /$0 $1-"
#define DEFAULT_FORMAT_USERMODE_FSET "$G %nMode change %K[%W$4-%K]%n for user %c$3"
#define DEFAULT_FORMAT_USERMODE_OTHER_FSET "$G %nMode change %K[%W$4-%K]%n for user %c$3%n by %W$1"
#define DEFAULT_FORMAT_USERLIST_FSET "$[16]0 $[10]1 $[-10]2 $[-25]3 $[10]4"
#define DEFAULT_FORMAT_USERLIST_FOOTER_FSET "There are $1 users on the userlist"
#define DEFAULT_FORMAT_USERLIST_HEADER_FSET "level nick password host channels"
#define DEFAULT_FORMAT_USERS_HEADER_FSET "%K[ %WC%nhannel %K] [ %WN%wickname %K] [ %WU%wser@host %K] [ %WL%wevel %K]"
#define DEFAULT_FORMAT_USERS_FSET "%K[%n$[11]1%K] [%C$5%c$[10]2%K] [%n$[38]3%K][%n$[7]0%K]"
#define DEFAULT_FORMAT_USERS_USER_FSET "%K[%n$[11]1%K] [%C$5%c$[10]2%K] [%p$[38]3%K][%n$[7]0%K]"
#define DEFAULT_FORMAT_USERS_SHIT_FSET "%K[%n$[11]1%K] [%C$5%c$[10]2%K] [%r$[38]3%K][%n$[7]0%K]"
#define DEFAULT_FORMAT_USERS_TITLE_FSET NULL
/* #define DEFAULT_FORMAT_USERS_FOOTER_FSET "%K[ %nEnd of channel %W$0 %K- %W$1 %nusers counted %K]"*/
/* #define DEFAULT_FORMAT_USERS_NONE_FSET "$G No match of %W$0%n on %c$1"*/
#define DEFAULT_FORMAT_VERSION_FSET "\002$0+$4$5\002 by panasync \002-\002 $2 $3"
#define DEFAULT_FORMAT_WALL_FSET "%G!%g$1:$2%G!%n $3-"
#define DEFAULT_FORMAT_WALL_AR_FSET "%G!%Y$1:$2%G!%n $3-"
#define DEFAULT_FORMAT_WALLOP_FSET "%K[%cWallOp%K] %n$2- ($1)"
#define DEFAULT_FORMAT_WHO_FSET "$[7]0 %W$[9]1%w $[3]2 $3@$4 ($6-)"
/* Done WHOIS WHOLEFT WHOWAS */
#define DEFAULT_FORMAT_WHOIS_AWAY_FSET "%K<> %Wa%nway %K:%n $1-"
#define DEFAULT_FORMAT_WHOIS_BOT_FSET "%g<> %Wb%not %K:%n A:$0 P:$1 [$2] $3-"
#define DEFAULT_FORMAT_WHOIS_CHANNELS_FSET "%g<> %Wc%nhannels %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_FRIEND_FSET "%g<> %Wf%nriend %K:%n L:$0 A:$1 P:$2 $3-"
#define DEFAULT_FORMAT_WHOIS_HEADER_FSET "%G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%g<>%G<><47>%g<><67>%G<>%g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%K<>%g<><67>%K<><4B>%g<>%K<><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-<2D> <20><> <20> -"
#define DEFAULT_FORMAT_WHOIS_IDLE_FSET "%K. %Wi%ndle %K:%n $0 hours $1 mins $2 secs (signon: $stime($3))"
#define DEFAULT_FORMAT_WHOIS_SHIT_FSET "%g<> %Ws%nhit %K:%n L:$0 [$1] $2 $3-"
#define DEFAULT_FORMAT_WHOIS_SIGNON_FSET "%K: %Ws%nignon %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET "%K| %Wa%nctually %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_CALLERID_FSET "%K! %Wc%nallerid %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_SECURE_FSET "%K! %Ws%necure %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_NAME_FSET "%G<> %Wi%nrcname %K:%n $0-"
#define DEFAULT_FORMAT_WHOIS_NICK_FSET "%G<> %W$0 %K(%n$1@$2%K) (%n$3-%K)"
#define DEFAULT_FORMAT_WHOIS_OPER_FSET "%K| %Wo%nperator %K:%n $0 $1-"
#define DEFAULT_FORMAT_WHOIS_SERVER_FSET "%K<> %Ws%nerver %K:%n $0 ($1-)"
#define DEFAULT_FORMAT_WHOLEFT_HEADER_FSET "%P<><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %WWho %P<><50><EFBFBD><EFBFBD><EFBFBD>%p<><70><EFBFBD>%P<><50><EFBFBD>%p<><70>%P<><50><EFBFBD><EFBFBD><EFBFBD>%p<><70>%P<><50> %WChannel%p <20>%K<> %WServer %K<>%p<><70><EFBFBD><EFBFBD>%K<><4B>%p<><70>%K<><4B>-- %WSeconds"
#define DEFAULT_FORMAT_WHOLEFT_USER_FSET "%P<>%n $[-10]0!$[20]1 $[10]2 $[20]4 $3"
#define DEFAULT_FORMAT_WHOLEFT_FOOTER_FSET "%P<><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%p<><70>%P<><50><EFBFBD>%p<><70><EFBFBD>%P<><50>%p<>%P<>%p<><70><EFBFBD><EFBFBD><EFBFBD>%K<>%p<><70><EFBFBD>%K<><4B><EFBFBD>%p<><70>%K<><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-- -- -"
#define DEFAULT_FORMAT_WHOWAS_NICK_FSET "%G<> %W$0%n was %K(%n$1@$2%K)"
/* Not convered in hades*/
#define DEFAULT_FORMAT_WHOIS_ADMIN_FSET "%K| %Wa%ndmin : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_SERVICE_FSET "%K| %Ws%nervice : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_HELP_FSET "%K| %Wh%nelp : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_REGISTER_FSET "%K| %Wr%negister : $0 - $1-"
#define DEFAULT_FORMAT_WIDELIST_FSET "$1-"
#define DEFAULT_FORMAT_WINDOW_SET_FSET "$0-"
#define DEFAULT_FORMAT_NICK_MSG_FSET "$0 $1 $2-"
#define DEFAULT_FORMAT_NICK_COMP_FSET "$0:$1-"
#define DEFAULT_FORMAT_NICK_AUTO_FSET "$0:$1-"
#define DEFAULT_FORMAT_STATUS_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS1_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS2_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS3_FSET "%4%W$0-"
#define DEFAULT_FORMAT_NOTIFY_OFF_FSET "$[10]0 $[35]1 $[-6]2 $[-10]3 $4 $5"
#define DEFAULT_FORMAT_NOTIFY_ON_FSET "$[10]0 $[35]1 $[-6]2 $[-10]3 $4-"
#define DEFAULT_FORMAT_OV_FSET "%S %>[OperView] "
#define DEFAULT_FORMAT_DEBUG_FSET "DEBUG"
#define DEFAULT_FORMAT_COMPLETE_FSET "%K[%n$[15]0%K] [%n$[15]1%K] [%n$[15]2%K] [%n$[15]3%K]"
#define DEFAULT_FORMAT_WHOIS_FOOTER_FSET NULL
#define DEFAULT_FORMAT_XTERM_TITLE_FSET NULL
#define DEFAULT_FORMAT_DCC_FSET NULL
#define DEFAULT_FORMAT_NAMES_FOOTER_FSET NULL
#define DEFAULT_FORMAT_NETSPLIT_HEADER_FSET NULL
#define DEFAULT_FORMAT_TOPIC_CHANGE_HEADER_FSET NULL
#define DEFAULT_FORMAT_WHOWAS_HEADER_FSET NULL
/* Color.h by Humble - Lets try the hades look =) */
#define DEFAULT_STATUS_FORMAT "<30>%T %*%N%# %@%C%+ %A%W%H%B%M%Q %>%D %L ]"
#define DEFAULT_STATUS_FORMAT1 "<30><6D> User: %*%N%#%A %^%H%B %>%D %S Ŀ"
#define DEFAULT_STATUS_FORMAT2 "<30> Channel: %@%C%+%W %M%Q %>%T %L <30><6D>"
#define DEFAULT_STATUS_AWAY "(A)"
#define DEFAULT_STATUS_CHANNEL "%C"
#define DEFAULT_STATUS_CHANOP "@"
#define DEFAULT_STATUS_HALFOP "%"
#define DEFAULT_STATUS_CLOCK "Time: %T"
#define DEFAULT_STATUS_HOLD " --More--"
#define DEFAULT_STATUS_HOLD_LINES " Hold: %B"
#define DEFAULT_STATUS_LAG " Lag: %L"
#define DEFAULT_STATUS_MODE "(%+)"
#define DEFAULT_STATUS_MAIL " Mail: %M"
#define DEFAULT_STATUS_NOTIFY " Notify: %F"
#define DEFAULT_STATUS_OPER "*"
#define DEFAULT_STATUS_VOICE "+"
#define DEFAULT_STATUS_QUERY " Query: %Q"
#define DEFAULT_STATUS_SERVER "Server: %S"
#define DEFAULT_STATUS_UMODE "(+%#)"
#define DEFAULT_STATUS_OPER_KILLS "[nk %d:ok %d]"
#define DEFAULT_STATUS_WINDOW "[<37>]"
#define DEFAULT_STATUS_FORMAT3 "BitchX by panasync, Hades formats by Humble"
#define DEFAULT_STATUS_INSERT ""
#define DEFAULT_STATUS_MSGCOUNT " Msgs: (%^)"
#define DEFAULT_STATUS_NICK "%N"
#define DEFAULT_STATUS_OVERWRITE "(overtype) "
#define DEFAULT_STATUS_TOPIC "%-"
#define DEFAULT_STATUS_USER " * type /help for help "
#define DEFAULT_STATUS_DCCCOUNT "[DCC gets/%& sends/%&]"
#define DEFAULT_STATUS_CDCCCOUNT "[CDCC gets/%| offer/%|]"
#define DEFAULT_STATUS_USERS "[O/%! N/%! I/%! V/%! F/%!]"
#define DEFAULT_STATUS_CPU_SAVER " (%J)"
#define DEFAULT_STATUS_USER1 ""
#define DEFAULT_STATUS_USER2 ""
#define DEFAULT_STATUS_USER3 ""
#define DEFAULT_STATUS_USER4 ""
#define DEFAULT_STATUS_USER5 ""
#define DEFAULT_STATUS_USER6 ""
#define DEFAULT_STATUS_USER7 ""
#define DEFAULT_STATUS_USER8 ""
#define DEFAULT_STATUS_USER9 ""
#define DEFAULT_STATUS_USER10 ""
#define DEFAULT_STATUS_USER11 ""
#define DEFAULT_STATUS_USER12 ""
#define DEFAULT_STATUS_USER13 ""
#define DEFAULT_STATUS_USER14 ""
#define DEFAULT_STATUS_USER15 ""
#define DEFAULT_STATUS_USER16 ""
#define DEFAULT_STATUS_USER17 ""
#define DEFAULT_STATUS_USER18 ""
#define DEFAULT_STATUS_USER19 ""
#define DEFAULT_STATUS_USER20 ""
#define DEFAULT_STATUS_USER21 ""
#define DEFAULT_STATUS_USER22 ""
#define DEFAULT_STATUS_USER23 ""
#define DEFAULT_STATUS_USER24 ""
#define DEFAULT_STATUS_USER25 ""
#define DEFAULT_STATUS_USER26 ""
#define DEFAULT_STATUS_USER27 ""
#define DEFAULT_STATUS_USER28 ""
#define DEFAULT_STATUS_USER29 ""
#define DEFAULT_STATUS_USER30 ""
#define DEFAULT_STATUS_USER31 ""
#define DEFAULT_STATUS_USER32 ""
#define DEFAULT_STATUS_USER33 ""
#define DEFAULT_STATUS_USER34 ""
#define DEFAULT_STATUS_USER35 ""
#define DEFAULT_STATUS_USER36 ""
#define DEFAULT_STATUS_USER37 ""
#define DEFAULT_STATUS_USER38 ""
#define DEFAULT_STATUS_USER39 ""
#define DEFAULT_STATUS_FLAG ""
#define DEFAULT_STATUS_SCROLLBACK " (Scroll)"
#define DEFAULT_FORMAT_LASTLOG_FSET "$strftime($0 %H:%M) $1-"
#define DEFAULT_INPUT_PROMPT "<30>-[bitchx]<5D>> "
#ifndef ONLY_STD_CHARS
#define DEFAULT_SHOW_NUMERICS_STR "<30><36><30>"
#else
#ifndef LATIN1
#define DEFAULT_SHOW_NUMERICS_STR "***"
#else
#define DEFAULT_SHOW_NUMERICS_STR "-:-"
#endif
#endif
#define DEFAULT_SERVER_PROMPT "%K[%c$0%K] "
#define DEFAULT_FORMAT_WATCH_SIGNOFF_FSET "$G $0!$1@$2 has signed off"
#define DEFAULT_FORMAT_WATCH_SIGNON_FSET "$G $0!$1@$2 has signed on $3"
#else
/* default bx */
#define DEFAULT_FORMAT_381_FSET "%K>%n>%W> You are now an %GIRC%n whore"
#define DEFAULT_FORMAT_391_FSET NULL
#define DEFAULT_FORMAT_471_FSET "$G [$1] Channel is full"
#define DEFAULT_FORMAT_473_FSET "$G [$1] Invite only channel"
#define DEFAULT_FORMAT_474_FSET "$G [$1] Banned from channel"
#define DEFAULT_FORMAT_475_FSET "$G [$1] Bad channel key"
#define DEFAULT_FORMAT_476_FSET "$G [$1] You are not opped"
#ifdef ONLY_STD_CHARS
#define DEFAULT_FORMAT_ACTION_FSET ansi?"%@%K* %W$1 %n$4-":"* $1 $4-"
#define DEFAULT_FORMAT_ACTION_AR_FSET ansi?"%@%K* %Y$1 %n$4-":"* $1 $4-"
#define DEFAULT_FORMAT_ACTION_CHANNEL_FSET ansi?"%@%K* %Y$1/$3 %n$4-":"* $1/$3 $4-"
#define DEFAULT_FORMAT_ACTION_OTHER_FSET ansi?"%@%K* %n>%c$1 %n$3-":"* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_OTHER_AR_FSET ansi?"%@%K* %Y>%c$1 %n$3-":"* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_USER_FSET ansi?"%@%K* %n>%c$1 %n$3-":"* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_USER_AR_FSET ansi?"%@%K* %Y>%c$1 %n$3-":"* >$1 $3-"
#else
#define DEFAULT_FORMAT_ACTION_FSET ansi?"%@%K<> %W$1 %n$4-":"%@<02> $1 $4-"
#define DEFAULT_FORMAT_ACTION_AR_FSET ansi?"%@%K<> %Y$1 %n$4-":"%@<02> $1 $4-"
#define DEFAULT_FORMAT_ACTION_CHANNEL_FSET ansi?"%@%K<> %Y$1/$3 %n$4-":"%@<02> $1/$3 $4-"
#define DEFAULT_FORMAT_ACTION_OTHER_FSET ansi?"%@%K* %n>%c$1 %n$3-":"%@* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_OTHER_AR_FSET ansi?"%@%K* %Y>%c$1 %n$3-":"%@* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_USER_FSET ansi?"%@%K* %n>%c$1 %n$3-":"%@* >$1 $3-"
#define DEFAULT_FORMAT_ACTION_USER_AR_FSET ansi?"%@%K* %Y>%c$1 %n$3-":"%@* >$1 $3-"
#endif
#define DEFAULT_FORMAT_ALIAS_FSET "Alias $[20.]0 $1-"
#define DEFAULT_FORMAT_ASSIGN_FSET "Assign $[20.]0 $1-"
#define DEFAULT_FORMAT_AWAY_FSET "is away: ($3-) $1 $2"
#define DEFAULT_FORMAT_BACK_FSET "is back from the dead. Gone $1 hrs $2 min $3 secs"
#define DEFAULT_FORMAT_BANS_HEADER_FSET "# Channel SetBy Sec Ban"
#define DEFAULT_FORMAT_BANS_FSET "$[2]0 $[10]1 $[10]3 $[-5]numdiff($time() $4) $2"
#define DEFAULT_FORMAT_EBANS_HEADER_FSET "# Channel SetBy Sec ExemptBan"
#define DEFAULT_FORMAT_EBANS_FSET "$[2]0 $[10]1 $[10]3 $[-5]numdiff($time() $4) $2"
#define DEFAULT_FORMAT_BITCH_FSET "%RBitch Mode Activated%n $1 $4 $5 on $3"
#define DEFAULT_FORMAT_BOT_HEADER_FSET "Aop Prot Bot Channel Hostname"
#define DEFAULT_FORMAT_BOT_FOOTER_FSET "There are $1 on the BotList"
#define DEFAULT_FORMAT_BOT_FSET "$[2]0 $[2]1 $[11]2 $[10]3 $4"
#define DEFAULT_FORMAT_BWALL_FSET "[%GBX-Wall%n/%W$1:$2%n] $4-"
#define DEFAULT_FORMAT_CHANNEL_SIGNOFF_FSET "$G %nSignOff %W$1%n: $3 %K(%n$4-%K)"
#define DEFAULT_FORMAT_CHANNEL_URL_FSET "$G URL %K(%c$1%K):%n $2-"
#define DEFAULT_FORMAT_CONNECT_FSET "$G Connecting to server $1/%c$2%n"
#define DEFAULT_FORMAT_COMPLETE_FSET "%K[%n$[15]0%K] [%n$[15]1%K] [%n$[15]2%K] [%n$[15]3%K]"
#define DEFAULT_FORMAT_CTCP_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4- from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4- from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FUNC_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4- from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_FUNC_USER_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4- from you"
#define DEFAULT_FORMAT_CTCP_CLOAK_UNKNOWN_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested unknown ctcp $4- from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_UNKNOWN_USER_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested unknown ctcp $4- from $3"
#define DEFAULT_FORMAT_CTCP_CLOAK_USER_FSET "%K>%n>%W> %C$1 %K[%c$2%K]%c requested $4- from you"
#define DEFAULT_FORMAT_CTCP_FUNC_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4- from $3"
#define DEFAULT_FORMAT_CTCP_FUNC_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4- from you"
#define DEFAULT_FORMAT_CTCP_UNKNOWN_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested unknown ctcp $4- from $3"
#define DEFAULT_FORMAT_CTCP_UNKNOWN_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested unknown ctcp $4- from %g$3"
#define DEFAULT_FORMAT_CTCP_USER_FSET "%K>%n>%W> %G$1 %K[%g$2%K]%g requested $4- from you"
#define DEFAULT_FORMAT_CTCP_REPLY_FSET "$G %nCTCP %W$3 %nreply from %n$1: $4-"
#define DEFAULT_FORMAT_DCC_CHAT_FSET ansi?"%@%K[%G$1%K(%gdcc%K)] %n$3-":"%@[$1(dcc)] $3-"
#define DEFAULT_FORMAT_DCC_CHAT_AR_FSET ansi?"%@%K[%Y$1%K(%Ydcc%K)] %n$3-":"%@[$1(dcc)] $3-"
#define DEFAULT_FORMAT_DCC_CONNECT_FSET "$G %RDCC%n $1 with %W$2%K[%c$4:$5%K]%n established"
#define DEFAULT_FORMAT_DCC_ERROR_FSET "$G %RDCC%n lost %w$1%w %rto $2 %K[%w$3-%K]"
#define DEFAULT_FORMAT_DCC_LOST_FSET "%@$G %RDCC%n %W$1%n:%g$2%n %K[%C$3%K]%n $4 $5 completed in $6 secs %K(%W$7 $8/sec%K)"
#define DEFAULT_FORMAT_DCC_REQUEST_FSET "%@$G %RDCC%n $1 %K(%n$2%K)%n request from %W$3%K[%c$4 [$5:$6]%K]%n $8 $7"
#define DEFAULT_FORMAT_DESYNC_FSET "$G $1 is desynced from $2 at $0"
#define DEFAULT_FORMAT_DISCONNECT_FSET "$G Use %G/Server%n to connect to a server"
#define DEFAULT_FORMAT_ENCRYPTED_NOTICE_FSET "%@%K-%Y$1%K(%p$2%K)-%n $3-"
#define DEFAULT_FORMAT_ENCRYPTED_PRIVMSG_FSET "%@%K[%Y$1%K(%p$2%K)]%n $3-"
#define DEFAULT_FORMAT_FLOOD_FSET "%Y$1%n flood detected from %G$2%K(%g$3%K)%n on %K[%G$4%K]"
#define DEFAULT_FORMAT_FRIEND_JOIN_FSET "$G %R$1 %K[%c$2%K]%n has joined $3"
#define DEFAULT_FORMAT_HELP_FSET "$0-"
#define DEFAULT_FORMAT_HOOK_FSET "$0-"
#define DEFAULT_FORMAT_INVITE_FSET "%K>%n>%W> $1 Invites You to $2-"
#define DEFAULT_FORMAT_INVITE_USER_FSET "%K>%n>%W> Inviting $1 to $2-"
#define DEFAULT_FORMAT_JOIN_FSET ansi?"$G %C$1 %K[%c$2%K]%n has joined $3":"$G $1 [$2] has joined $3"
#define DEFAULT_FORMAT_KICK_FSET "$G %n$3 was kicked off $2 by %c$1 %K(%n$4-%K)"
#define DEFAULT_FORMAT_KICK_USER_FSET "%K>%n>%W> %WYou%n have been kicked off %c$2%n by %c$1 %K(%n$4-%K)"
#define DEFAULT_FORMAT_KILL_FSET "%K>%n>%W> %RYou have been killed by $1 for $2-"
#define DEFAULT_FORMAT_LEAVE_FSET "$G $1 %K[%w$2%K]%n has left $3 %K[%W$4-%K]"
#ifdef ONLY_STD_CHARS
#define DEFAULT_FORMAT_LINKS_FSET "%K|%n$[24]0%K| |%n$[24]1%K| |%n$[3]2%K| |%n$[13]3%K|"
#else
#define DEFAULT_FORMAT_LINKS_FSET "%K<>%n$[24]0%K<> <20>%n$[24]1%K<> <20>%n$[3]2%K<> <20>%n$[13]3%K<>"
#endif
#define DEFAULT_FORMAT_LIST_FSET "$[12]1 $[-5]2 $[40]3-"
#define DEFAULT_FORMAT_MAIL_FSET "%K>%n>%W> You've got mail!@#"
#define DEFAULT_FORMAT_MSGCOUNT_FSET "[$0-]"
#define DEFAULT_FORMAT_MSGLOG_FSET "[$[8]0] [$1] - $2-"
#define DEFAULT_FORMAT_MODE_FSET ansi?"$G %nmode%K/%c$3 %K[%W$4-%K]%n by %W$1":"$G mode/$3 [$4-] by $1"
#define DEFAULT_FORMAT_SMODE_FSET "$G %RServerMode%K/%c$3 %K[%W$4-%K]%n by %W$1"
#define DEFAULT_FORMAT_MODE_CHANNEL_FSET "$G %nmode%K/%c$3 %K[%W$4-%K]%n by %W$1"
#define DEFAULT_FORMAT_MSG_FSET ansi?"%@%K[%P$1%K(%p$2%K)]%n $3-":"%@[$1($2)] $3-"
#define DEFAULT_FORMAT_MSG_AR_FSET ansi?"%@%K[%Y$1%K(%Y$2%K)]%n $3-":"%@[$1($2)] $3-"
#define DEFAULT_FORMAT_OPER_FSET "%C$1 %K[%c$2%K]%n )s now %Wan%w %GIRC%n whore"
#define DEFAULT_FORMAT_IGNORE_INVITE_FSET "%K>%n>%W> You have been invited to $1-"
#define DEFAULT_FORMAT_IGNORE_MSG_FSET "%K[%P$1%P$2%K(%p$3%K)]%n $4-"
#define DEFAULT_FORMAT_IGNORE_MSG_AWAY_FSET "%K[%P$1%P$2%K(%p$3%K)]%n $4-"
#define DEFAULT_FORMAT_IGNORE_NOTICE_FSET "%K-%P$2%K(%p$3%K)-%n $4-"
#define DEFAULT_FORMAT_IGNORE_WALL_FSET "%K%P$1%n $2-"
#define DEFAULT_FORMAT_MSG_GROUP_FSET "%K-%P$1%K:%p$2%K-%n $3-"
#define DEFAULT_FORMAT_MSG_GROUP_AR_FSET "%K-%Y$1%K:%Y$2%K-%n $3-"
#define DEFAULT_FORMAT_NAMES_FSET ansi?"$G %K[%GUsers%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [Users($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_BOT_FSET ansi?"$G %K[%GBots%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [Bots($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_FRIEND_FSET ansi?"$G %K[%GFriends%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [Friends($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_NONOP_FSET ansi?"$G %K[%GNonChanOps%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [NonChanOps($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_OP_FSET ansi?"$G %K[%GChanOps%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [ChanOps($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_IRCOP_FSET ansi?"$G %K[%GIrcOps%K(%g$1%K:%g$2%K/%g$3%K)]%c $4":"$G [IrcOps($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_SHIT_FSET ansi?"$G %K[%MShitUsers%K(%m$1%K:%m$2%K/%m$3%K)]%c $4":"$G [ShitUsers(_$1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_VOICE_FSET ansi?"$G %K[%MVoiceUsers%K(%m$1%K:%m$2%K/%m$3%K)]%c $4":"$G [VoiceUsers($1:$2/$3)] $4"
#define DEFAULT_FORMAT_NAMES_NICK_FSET ansi?"%B$[10]0":"$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_BOT_FSET ansi?"%G$[10]0":"$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_FRIEND_FSET ansi?"%Y$[10]0":"$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_ME_FSET ansi?"%W$[10]0":"$[10]0"
#define DEFAULT_FORMAT_NAMES_NICK_SHIT_FSET ansi?"%R$[10]0":"$[10]0"
#define DEFAULT_FORMAT_NAMES_USER_FSET ansi?"%K[ %n$1-%K]":"[ $1-]"
#define DEFAULT_FORMAT_NAMES_USER_CHANOP_FSET ansi?"%K[%C$0%n$1-%K]":"[$0$1-]"
#define DEFAULT_FORMAT_NAMES_USER_IRCOP_FSET ansi?"%K[%R$0%n$1-%K]":"[$0$1-]"
#define DEFAULT_FORMAT_NAMES_USER_VOICE_FSET ansi?"%K[%M$0%n$1-%K]":"[$0$1-]"
#define DEFAULT_FORMAT_NETADD_FSET "$G %nAdded: %W$1 $2"
#define DEFAULT_FORMAT_NETJOIN_FSET "$G %nNetjoined: %W$1 $2"
#define DEFAULT_FORMAT_NETSPLIT_FSET "$G %nNetSplit: %W$1%n split from %W$2 %K[%c$0%K]"
#define DEFAULT_FORMAT_NICKNAME_FSET "$G %W$1 %nis now known as %c$3"
#define DEFAULT_FORMAT_NICKNAME_OTHER_FSET "$G %W$1 %nis now known as %c$3"
#define DEFAULT_FORMAT_NICKNAME_USER_FSET "%K>%n>%W> %WYou%K(%n$1%K)%n are now known as %c$3"
#define DEFAULT_FORMAT_NONICK_FSET "%W$1%K:%n $3-"
#define DEFAULT_FORMAT_NOTE_FSET "($0) ($1) ($2) ($3) ($4) ($5-)"
#define DEFAULT_FORMAT_NOTICE_FSET ansi?"%K-%P$1%K(%p$2%K)-%n $3-":"-$1($2)- $3-"
#define DEFAULT_FORMAT_REL_FSET "%K[%rmsg->$1%K]%n $4-"
#define DEFAULT_FORMAT_RELN_FSET "%K-%P$1%K(%p$2%K)-%n $4-"
#define DEFAULT_FORMAT_RELM_FSET "%K[%P%P$1%K(%p$2%K)]%n $4-"
#define DEFAULT_FORMAT_RELSN_FSET "%K[%rnotice%K(%R$1%K)] %n$2-"
#define DEFAULT_FORMAT_RELS_FSET "$1-"
#define DEFAULT_FORMAT_RELSM_FSET "%K[%rmsg%K(%R$1%K)] %n$2-"
#define DEFAULT_FORMAT_NOTIFY_SIGNOFF_FSET "$G %GSignoff%n by %r$1%K!%r$2%n at $0"
#define DEFAULT_FORMAT_NOTIFY_SIGNON_FSET "$G %GSignon%n by %R$1%K!%R$2%n at $0"
#define DEFAULT_FORMAT_PASTE_FSET "%K[%W$1%K]%n $2-"
#define DEFAULT_FORMAT_PUBLIC_FSET ansi?"%@%B<%n$1%B>%n $3-":"%@<$1> $3-"
#define DEFAULT_FORMAT_PUBLIC_AR_FSET ansi?"%@%B<%Y$1%B>%n $3-":"%@<$1> $3-"
#define DEFAULT_FORMAT_PUBLIC_MSG_FSET ansi?"%@%b(%n$1%K/%n$3%b)%n $4-":"%@($1/$3) $4-"
#define DEFAULT_FORMAT_PUBLIC_MSG_AR_FSET ansi?"%@%b(%Y$1%K/%Y$3%b)%n $4-":"%@($1/$3) $4-"
#define DEFAULT_FORMAT_PUBLIC_NOTICE_FSET ansi?"%@%K-%P$1%K:%p$3%K-%n $4-":"%@-$1:$3- $4-"
#define DEFAULT_FORMAT_PUBLIC_NOTICE_AR_FSET ansi?"%@%K-%Y$1%K:%Y$3%K-%n $4-":"%@-$1:$3- $4-"
#define DEFAULT_FORMAT_PUBLIC_OTHER_FSET ansi?"%@%b<%n$1%K:%n$2%b>%n $3-":"%@<$1:$2> $3-"
#define DEFAULT_FORMAT_PUBLIC_OTHER_AR_FSET ansi?"%@%b<%Y$1%K:%n$2%b>%n $3-":"%@<$1:$2> $3-"
#ifdef ONLY_STD_CHARS
#define DEFAULT_FORMAT_SEND_ACTION_FSET "%K* %W$1 %n$3-"
#define DEFAULT_FORMAT_SEND_ACTION_OTHER_FSET "%K* %n-> %W$1%n/%c$2 %n$3-"
#else
#define DEFAULT_FORMAT_SEND_ACTION_FSET "%K<> %W$1 %n$3-"
#define DEFAULT_FORMAT_SEND_ACTION_OTHER_FSET "%K<> %n-> %W$1%n/%c$2 %n$3-"
#endif
#define DEFAULT_FORMAT_SEND_AWAY_FSET "[Away ($strftime($1 %a %b %d %I:%M%p %Z))] [$tdiff2(${time() - u})] [BX-MsgLog $2]"
#define DEFAULT_FORMAT_SEND_CTCP_FSET ansi?"%K[%rctcp%K(%R$1%K)] %n$2":"[ctcp($1)] $2"
#define DEFAULT_FORMAT_SEND_RCTCP_FSET ansi?"%K[%rrctcp%K(%R$1%K)] %n$2-":"^B[rctcp(^B$1^B)]^B $2-"
#define DEFAULT_FORMAT_SEND_DCC_CHAT_FSET ansi?"%K[%rdcc%K(%R$1%K)] %n$2-":"[dcc($1)] $2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_NOTICE_FSET "%K-%Y$1%K(%p$2%K)-%n $2-"
#define DEFAULT_FORMAT_SEND_ENCRYPTED_MSG_FSET "%K[%Y$1%K(%p$2%K)]%n $2-"
#define DEFAULT_FORMAT_SEND_MSG_FSET ansi?"%K[%rmsg%K(%R$1%K)] %n$3-":"[msg($1)] $3-"
#define DEFAULT_FORMAT_SEND_NOTICE_FSET ansi?"%K[%rnotice%K(%R$1%K)] %n$3-":"[notice($1)] $3-"
#define DEFAULT_FORMAT_SEND_PUBLIC_FSET ansi?"%P<%n$2%P>%n $3-":"<$2> $3-"
#define DEFAULT_FORMAT_SEND_PUBLIC_OTHER_FSET ansi?"%p<%n$2%K:%n$1%p>%n $3-":"<$2:$1> $3-"
#define DEFAULT_FORMAT_SERVER_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG1_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG1_FROM_FSET "$G%n $1: $2-"
#define DEFAULT_FORMAT_SERVER_MSG2_FSET "$G%n $1-"
#define DEFAULT_FORMAT_SERVER_MSG2_FROM_FSET "$G%n $1-"
#define DEFAULT_FORMAT_SERVER_NOTICE_FSET " $2-"
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT_FSET " Possible bot: %C$1 %K[%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT1_FSET " Possible $1 bot: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_BOT_ALARM_FSET " $1 alarm activated: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_CONNECT_FSET " Client Connecting: %C$1 %K[%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_EXIT_FSET " Client Exiting: %C$1 %K[%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_INVALID_FSET " Invalid username: %C$1 %K[%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_CLIENT_TERM_FSET " Terminating client for excess flood %C$1%K [%c$2-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_FAKE_FSET " Fake Mode detected on $1 -> $2-"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_FSET " Foreign OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KILL_LOCAL_FSET " Local OperKill: %W$1%n killed %c$2%n %K(%n$3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_KLINE_FSET " %W$1%n added a new K-Line %K[%c$2%K]%n for $3-"
#define DEFAULT_FORMAT_SERVER_NOTICE_GLINE_FSET " %W$1%n added a new K-Line %K[%c$2%K]%n from $3 for $4-"
#define DEFAULT_FORMAT_SERVER_NOTICE_NICK_COLLISION_FSET " Nick collision %W$1%n killed %c$2%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_OPER_FSET " %C$1 %K[%c$2%K]%n is now %Wa%w %GIRC%n whore"
#define DEFAULT_FORMAT_SERVER_NOTICE_REHASH_FSET " %W$1%n is rehashing the Server config file"
#define DEFAULT_FORMAT_SERVER_NOTICE_STATS_FSET " Stats $1: %C$2 %K[%c$3-%K]%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_TRAFFIC_HIGH_FSET " Entering high-traffic mode %K(%n$1 > $2-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_TRAFFIC_NORM_FSET " Resuming standard operation %K(%n$1 $2 $3-%K)%n"
#define DEFAULT_FORMAT_SERVER_NOTICE_UNAUTH_FSET " Unauthorized Connection from $1-"
#define DEFAULT_FORMAT_SET_FSET "%g$[-30.]0 %w$1-"
#define DEFAULT_FORMAT_CSET_FSET "%r$[-14]1 %R$[-20.]0 %w$2-"
#define DEFAULT_FORMAT_SET_NOVALUE_FSET "%g$[-30.]0 has no value"
#define DEFAULT_FORMAT_SHITLIST_FSET " $[3]0 $[34]1 $[10]2 $3-"
#define DEFAULT_FORMAT_SHITLIST_FOOTER_FSET "There are $1 users on the shitlist"
#define DEFAULT_FORMAT_SHITLIST_HEADER_FSET " lvl nick!user@host channels reason"
#define DEFAULT_FORMAT_SIGNOFF_FSET "$G %nSignOff: %W$1 %K(%n$3-%K)"
#define DEFAULT_FORMAT_SILENCE_FSET "$G %RWe are $1 silencing $2 at $0"
#define DEFAULT_FORMAT_TRACE_OPER_FSET "%R$1%n %K[%n$3%K]"
#define DEFAULT_FORMAT_TRACE_SERVER_FSET "%R$1%n $2 $3 $4 %K[%n$5%K]%n $6-"
#define DEFAULT_FORMAT_TRACE_USER_FSET "%R$1%n %K[%n$3%K]"
#define DEFAULT_FORMAT_TIMER_FSET "$G $[-5]0 $[-10]1 $[-6]2 $3-"
#define DEFAULT_FORMAT_TOPIC_FSET "$G Topic %K(%c$1%K):%n $2-"
#define DEFAULT_FORMAT_TOPIC_CHANGE_FSET "$G Topic %K(%c$2%K):%n changed by %c$1%K:%n $3-"
#define DEFAULT_FORMAT_TOPIC_SETBY_FSET "$G Topic %K(%c$1%K):%n set by %c$2%n at %c$stime($3)%n"
#define DEFAULT_FORMAT_TOPIC_UNSET_FSET "$G Topic %K(%c$2%K):%n unset by %c$1%n"
#define DEFAULT_FORMAT_USAGE_FSET "$G Usage: /$0 $1-"
#define DEFAULT_FORMAT_USERMODE_FSET "$G %nMode change %K[%W$4-%K]%n for user %c$3"
#define DEFAULT_FORMAT_USERMODE_OTHER_FSET "$G %nMode change %K[%W$4-%K]%n for user %c$3%n by %W$1"
#define DEFAULT_FORMAT_USERLIST_FSET "$[16]0 $[10]1 $[-10]2 $[-25]3 $[10]4"
#define DEFAULT_FORMAT_USERLIST_FOOTER_FSET "There are $1 users on the userlist"
#define DEFAULT_FORMAT_USERLIST_HEADER_FSET "level nick password host channels"
#define DEFAULT_FORMAT_USERS_FSET "%K[%C$[1]5%B$[9]2%K][%n$[41]3%K][%n$[15]0%K](%n$4%K)"
#define DEFAULT_FORMAT_USERS_USER_FSET "%K[%C$[1]5%B$[9]2%K][%n%B$[41]3%K][%n$0%K](%n$4%K)"
#define DEFAULT_FORMAT_USERS_SHIT_FSET "%K[%C$[1]5%B$[9]2%K][%n%r$[41]3%K][%n$[-15]0%K](%n$4%K)"
#define DEFAULT_FORMAT_USERS_TITLE_FSET "$G Channel userlist for %W$1%n at ($0):"
#define DEFAULT_FORMAT_USERS_HEADER_FSET NULL /*"%K[ %WC%nhannel %K][ %WN%wickname %K][%n %Wu%wser@host %K][%n %Wl%wevel %K]"*/
#define DEFAULT_FORMAT_VERSION_FSET "\002$0+$4$5\002 by panasync \002-\002 $2 $3"
#define DEFAULT_FORMAT_WALL_FSET "%@%G!%g$1:$2%G!%n $3-"
#define DEFAULT_FORMAT_WALL_AR_FSET "%@%G!%Y$1:$2%G!%n $3-"
#define DEFAULT_FORMAT_WALLOP_FSET "%G!%g$1$2%G!%n $3-"
#define DEFAULT_FORMAT_WHO_FSET "%Y$[10]0 %W$[10]1%w %c$[3]2 %w$3%R@%w$4 ($6-)"
#ifdef ONLY_STD_CHARS
#define DEFAULT_FORMAT_WHOIS_AWAY_FSET ansi?"%K| %Wa%nway : $0 - $1-":"| away : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_BOT_FSET ansi?"%g| %Wb%not : A:$0 P:$1 [$2] $3-":"| bot : A:$0 P:$1 [$2] $3-"
#define DEFAULT_FORMAT_WHOIS_CHANNELS_FSET ansi?"%g| %Wc%nhannels : $0-":"| channels : $0-"
#define DEFAULT_FORMAT_WHOIS_FRIEND_FSET ansi?"%g| %Wf%nriend : F:$0 $1-":"| friend : F:$0 $1-"
#define DEFAULT_FORMAT_WHOIS_HEADER_FSET ansi?"%G.--------%g-%G--%g--%G-%g---------%K-%g--%K--%g-%K------------ -- -":".----------------------------------------- -- -"
#define DEFAULT_FORMAT_WHOIS_IDLE_FSET ansi?"%K: %Wi%ndle : $0 hours $1 mins $2 secs (signon: $stime($3))":": idle : $0 hours $1 mins $2 secs (signon: $stime($3))"
#define DEFAULT_FORMAT_WHOIS_SHIT_FSET ansi?"%g| %Ws%nhit : L:$0 [$1] $2 $3-":"| shit : L:$0 [$1] $2 $3-"
#define DEFAULT_FORMAT_WHOIS_SIGNON_FSET ansi?"%K| %Ws%nignon : $0-":"| signon : $0-"
#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K: %Wa%nctually : $0-":": actually : $0-"
#define DEFAULT_FORMAT_WHOIS_CALLERID_FSET ansi?"%K! %Wc%nallerid : $0-":"! callerid : $0-"
#define DEFAULT_FORMAT_WHOIS_SECURE_FSET ansi?"%K! %Ws%necure : $0-":"! secure : $0-"
#define DEFAULT_FORMAT_WHOIS_NAME_FSET ansi?"%G: %Wi%nrcname : $0-":": ircname : $0-"
#define DEFAULT_FORMAT_WHOIS_NICK_FSET ansi?"%G| %W$0 %K(%n$1@$2%K) %K(%W$3-%K)":"| $0 ($1@$2) ($3-)"
#define DEFAULT_FORMAT_WHOIS_OPER_FSET ansi?"%K| %Wo%nperator : $0 $1-":"| operator : $0 $1-"
#define DEFAULT_FORMAT_WHOIS_SERVER_FSET ansi?"%K| %Ws%nerver : $0 ($1-)":"| server : $0 ($1-)"
#define DEFAULT_FORMAT_WHOLEFT_HEADER_FSET ansi?"%G.----- %WWho %G-----%g---%G---%g--%G-----%g--%G-- %WChannel%g--- %wServer %G-%g----%G--%g--%G----%g %wSeconds":".----- Who ---------------------- Channel--- Server ------------- Seconds"
#define DEFAULT_FORMAT_WHOLEFT_USER_FSET ansi?"%G|%n $[-10]0!$[20]1 $[10]2 $[20]4 $3":"| $[-10]0!$[20]1 $[10]2 $[20]4 $3"
#define DEFAULT_FORMAT_WHOWAS_HEADER_FSET ansi?"%G.--------%g-%G--%g--%G-%g---------%K-%g--%K--%g-%K------------ -- -":".----------------------------------------- -- -"
#define DEFAULT_FORMAT_WHOWAS_NICK_FSET ansi?"%G| %W$0%n was %K(%n$1@$2%K)":"| $0 was ($1@$2)"
#define DEFAULT_FORMAT_WHOIS_ADMIN_FSET ansi?"%K| %Wa%ndmin : $0 - $1-":"| admin : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_SERVICE_FSET ansi?"%K| %Ws%nervice : $0 - $1-":"| service : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_HELP_FSET ansi?"%K| %Wh%nelp : $0 - $1-":"| help : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_REGISTER_FSET ansi?"%K| %Wr%negister : $0 - $1-":"| register : $0 - $1-"
#else
#define DEFAULT_FORMAT_WHOIS_AWAY_FSET ansi?"%K| %Wa%nway : $0 - $1-":"| away : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_BOT_FSET ansi?"%g| %Wb%not : A:$0 P:$1 [$2] $3-":"| bot : A:$0 P:$1 [$2] $3-"
#define DEFAULT_FORMAT_WHOIS_CHANNELS_FSET ansi?"%g| %Wc%nhannels : $0-":"| channels : $0-"
#define DEFAULT_FORMAT_WHOIS_FRIEND_FSET ansi?"%g| %Wf%nriend : F:$0 $1-":"| friend : F:$0 $1-"
#define DEFAULT_FORMAT_WHOIS_HEADER_FSET ansi?"%G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---%g<>%G--%g<><67>%G-%g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---%K<>%g--%K<><4B>%g-%K<><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--- -- -":"<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---<02>--<02><>-<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---<02>--<02><>-<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--- -- -"
#define DEFAULT_FORMAT_WHOIS_IDLE_FSET ansi?"%K: %Wi%ndle : $0 hours $1 mins $2 secs (signon: $stime($3))":": idle : $0 hours $1 mins $2 secs (signon: $stime($3))"
#define DEFAULT_FORMAT_WHOIS_SHIT_FSET ansi?"%g| %Ws%nhit : L:$0 [$1] $2 $3-":"| shit : L:$0 [$1] $2 $3-"
#define DEFAULT_FORMAT_WHOIS_SIGNON_FSET ansi?"%K %Ws%nignon : $0-":" signon : $0-"
#define DEFAULT_FORMAT_WHOIS_ACTUALLY_FSET ansi?"%K| %Wa%nctually : $0-":"| actually : $0-"
#define DEFAULT_FORMAT_WHOIS_CALLERID_FSET ansi?"%K! %Wc%nallerid : $0-":"! callerid : $0-"
#define DEFAULT_FORMAT_WHOIS_SECURE_FSET ansi?"%K! %Ws%necure : $0-":"! secure : $0-"
#define DEFAULT_FORMAT_WHOIS_NAME_FSET ansi?"%G<> %Wi%nrcname : $0-":"<02> ircname : $0-"
#define DEFAULT_FORMAT_WHOIS_NICK_FSET ansi?"%G| %W$0 %K(%n$1@$2%K) %K(%W$3-%K)":"| $0 ($1@$2) ($3-)"
#define DEFAULT_FORMAT_WHOIS_OPER_FSET ansi?"%K| %Wo%nperator : $0 $1-":"| operator : $0 $1-"
#define DEFAULT_FORMAT_WHOIS_SERVER_FSET ansi?"%K<> %Ws%nerver : $0 ($1-)":"<02> server : $0 ($1-)"
#define DEFAULT_FORMAT_WHOLEFT_HEADER_FSET ansi?"%G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %WWho %G<><47><EFBFBD><EFBFBD><EFBFBD>%g---%G<><47><EFBFBD>%g--%G<><47><EFBFBD><EFBFBD><EFBFBD>%g<>-%G<><47> %WChannel%g<><67><EFBFBD> %wServer %G-%g<><67>--%G<><47>%g--%G<><47><EFBFBD><EFBFBD>%g %wSeconds":"<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Who <02><><EFBFBD><EFBFBD><EFBFBD>---<02><><EFBFBD>--<02><><EFBFBD><EFBFBD><EFBFBD><02>-<02><> Channel<02><><EFBFBD> Server -<02><>--<02><>--<02><><EFBFBD><EFBFBD> Seconds"
#define DEFAULT_FORMAT_WHOLEFT_USER_FSET ansi?"%G|%n $[-10]0!$[20]1 $[10]2 $[20]4 $3":"| $[-10]0!$[20]1 $[10]2 $[20]4 $3"
#define DEFAULT_FORMAT_WHOWAS_HEADER_FSET ansi?"%G<><47><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---%g<>%G--%g<><67>%G-%g<><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---%K<>%g--%K<><4B>%g-%K<><4B><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--- -- -":"<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---<02>--<02><>-<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>---<02>--<02><>-<02><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>--- -- -"
#define DEFAULT_FORMAT_WHOWAS_NICK_FSET ansi?"%G| %W$0%n was %K(%n$1@$2%K)":"| $0 was ($1@$2)"
#define DEFAULT_FORMAT_WHOIS_ADMIN_FSET ansi?"%K| %Wa%ndmin : $0 - $1-":"| admin : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_SERVICE_FSET ansi?"%K| %Ws%nervice : $0 - $1-":"| service : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_HELP_FSET ansi?"%K| %Wh%nelp : $0 - $1-":"| help : $0 - $1-"
#define DEFAULT_FORMAT_WHOIS_REGISTER_FSET ansi?"%K| %Wr%negister : $0 - $1-":"| register : $0 - $1-"
#endif
#define DEFAULT_FORMAT_WIDELIST_FSET "$1-"
#define DEFAULT_FORMAT_WINDOW_SET_FSET "$0-"
#define DEFAULT_FORMAT_NICK_MSG_FSET "$0 $1 $2-"
#define DEFAULT_FORMAT_NICK_COMP_FSET "$0\002:\002$1-"
#define DEFAULT_FORMAT_NICK_AUTO_FSET "$0\002:\002$1-"
#define DEFAULT_FORMAT_STATUS_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS1_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS2_FSET "%4%W$0-"
#define DEFAULT_FORMAT_STATUS3_FSET "%4%W$0-"
#define DEFAULT_FORMAT_NOTIFY_OFF_FSET "$[10]0 $[35]1 $[-6]2 $[-10]3 $4 $5"
#define DEFAULT_FORMAT_NOTIFY_ON_FSET "$[10]0 $[35]1 $[-6]2 $[-10]3 $4-"
#define DEFAULT_FORMAT_OV_FSET "%S %>[OperView] "
#define DEFAULT_FORMAT_DEBUG_FSET "DEBUG"
#define DEFAULT_FORMAT_WHOIS_FOOTER_FSET NULL
#define DEFAULT_FORMAT_XTERM_TITLE_FSET NULL
#define DEFAULT_FORMAT_DCC_FSET NULL
#define DEFAULT_FORMAT_NAMES_FOOTER_FSET NULL
#define DEFAULT_FORMAT_NETSPLIT_HEADER_FSET NULL
#define DEFAULT_FORMAT_TOPIC_CHANGE_HEADER_FSET NULL
#define DEFAULT_FORMAT_WHOLEFT_FOOTER_FSET NULL
#define DEFAULT_STATUS_FORMAT " [%T][%*%@%=%N%#%A]%M [%C%+%W] %Q %H%B%F "
#define DEFAULT_STATUS_FORMAT1 " [%T][%*%@%G%=%N%#%A]%M [%C%+%W] %Q %H%B%F "
#define DEFAULT_STATUS_FORMAT2 " %L %! %K %>%D %J[%u:%a:%f:%b:%h]"
#define DEFAULT_STATUS_FORMAT3 "BitchX by panasync "
#define DEFAULT_STATUS_AWAY " (zZzZ %A)"
#define DEFAULT_STATUS_CHANNEL "%C"
#define DEFAULT_STATUS_CHANOP "@"
#define DEFAULT_STATUS_HALFOP "%"
#define DEFAULT_STATUS_CLOCK "%T"
#define DEFAULT_STATUS_HOLD " -- more --"
#define DEFAULT_STATUS_HOLD_LINES " (%B)"
#define DEFAULT_STATUS_INSERT ""
#define DEFAULT_STATUS_LAG "[Lag %L]"
#define DEFAULT_STATUS_MODE "(+%+)"
#define DEFAULT_STATUS_MAIL "[Mail: %M]"
#define DEFAULT_STATUS_MSGCOUNT " Aw[%^]"
#define DEFAULT_STATUS_NICK "%N"
#define DEFAULT_STATUS_NOTIFY " [Act: %F]"
#define DEFAULT_STATUS_OPER "*"
#define DEFAULT_STATUS_VOICE "+"
#define DEFAULT_STATUS_OVERWRITE "(overtype) "
#define DEFAULT_STATUS_QUERY " [Query: %Q]"
#define DEFAULT_STATUS_SERVER " via %S"
#define DEFAULT_STATUS_TOPIC "%-"
#define DEFAULT_STATUS_UMODE "(+%#)"
#define DEFAULT_STATUS_USER " * type /help for help "
#define DEFAULT_STATUS_DCCCOUNT "[DCC gets/%& sends/%&]"
#define DEFAULT_STATUS_CDCCCOUNT "[CDCC gets/%| offer/%|]"
#define DEFAULT_STATUS_OPER_KILLS "[nk/%K ok/%K]"
#define DEFAULT_STATUS_USERS "[O/%! N/%! I/%! V/%! F/%!]"
#define DEFAULT_STATUS_CPU_SAVER " (%J)"
#define DEFAULT_STATUS_USER1 ""
#define DEFAULT_STATUS_USER2 ""
#define DEFAULT_STATUS_USER3 ""
#define DEFAULT_STATUS_USER4 ""
#define DEFAULT_STATUS_USER5 ""
#define DEFAULT_STATUS_USER6 ""
#define DEFAULT_STATUS_USER7 ""
#define DEFAULT_STATUS_USER8 ""
#define DEFAULT_STATUS_USER9 ""
#define DEFAULT_STATUS_USER10 ""
#define DEFAULT_STATUS_USER11 ""
#define DEFAULT_STATUS_USER12 ""
#define DEFAULT_STATUS_USER13 ""
#define DEFAULT_STATUS_USER14 ""
#define DEFAULT_STATUS_USER15 ""
#define DEFAULT_STATUS_USER16 ""
#define DEFAULT_STATUS_USER17 ""
#define DEFAULT_STATUS_USER18 ""
#define DEFAULT_STATUS_USER19 ""
#define DEFAULT_STATUS_USER20 ""
#define DEFAULT_STATUS_USER21 ""
#define DEFAULT_STATUS_USER22 ""
#define DEFAULT_STATUS_USER23 ""
#define DEFAULT_STATUS_USER24 ""
#define DEFAULT_STATUS_USER25 ""
#define DEFAULT_STATUS_USER26 ""
#define DEFAULT_STATUS_USER27 ""
#define DEFAULT_STATUS_USER28 ""
#define DEFAULT_STATUS_USER29 ""
#define DEFAULT_STATUS_USER30 ""
#define DEFAULT_STATUS_USER31 ""
#define DEFAULT_STATUS_USER32 ""
#define DEFAULT_STATUS_USER33 ""
#define DEFAULT_STATUS_USER34 ""
#define DEFAULT_STATUS_USER35 ""
#define DEFAULT_STATUS_USER36 ""
#define DEFAULT_STATUS_USER37 ""
#define DEFAULT_STATUS_USER38 ""
#define DEFAULT_STATUS_USER39 ""
#define DEFAULT_STATUS_WINDOW "^^^^^^^^"
#define DEFAULT_STATUS_FLAG ""
#define DEFAULT_STATUS_SCROLLBACK " (Scroll)"
#define DEFAULT_FORMAT_LASTLOG_FSET "$strftime($0 %H:%M) $1-"
#define DEFAULT_INPUT_PROMPT "[$C] "
#ifndef ONLY_STD_CHARS
#define DEFAULT_SHOW_NUMERICS_STR "<31><37><31>"
#else
#ifndef LATIN1
#define DEFAULT_SHOW_NUMERICS_STR "***"
#else
#define DEFAULT_SHOW_NUMERICS_STR "-:-"
#endif
#endif
#define DEFAULT_SERVER_PROMPT "[$0]"
#define DEFAULT_FORMAT_WATCH_SIGNOFF_FSET "$G $0!$1@$2 has signed off"
#define DEFAULT_FORMAT_WATCH_SIGNON_FSET "$G $0!$1@$2 has signed on $3"
#endif
#endif

305
include/commands.h Normal file
View File

@@ -0,0 +1,305 @@
/*
* edit.h: header for edit.c
*
*/
#ifndef __edit_h_
#define __edit_h_
#include "irc_std.h"
extern char *sent_nick;
extern char *sent_body;
extern char *recv_nick;
void BX_send_text (const char *, const char *, char *, int, int);
void eval_inputlist (char *, char *);
int BX_parse_command (char *, int, char *);
void BX_parse_line (const char *, char *, const char *, int, int, int);
void edit_char (unsigned char);
void execute_timer (void);
void ison_now (char *, char *);
void quote_char (char, char *);
void type_text (char, char *);
void parse_text (char, char *);
void irc_clear_screen (char, char *);
int check_wait_command (char *);
void ExecuteTimers (void);
int check_mode_lock (char *, char *, int);
void destroy_call_stack (void);
void unwind_stack (void);
void wind_stack (char *);
void redirect_text (int, const char *, const char *, char *, int, int);
int command_exist (char *);
/* a few advance declarations */
extern void my_clear (char *, char *, char *, char *);
extern void reconnect_cmd (char *, char *, char *, char *);
extern void e_hostname (char *, char *, char *, char *);
extern void BX_load (char *, char *, char *, char *);
extern void query (char *, char *, char *, char *);
extern void unquery (char *, char *, char *, char *);
extern void away (char *, char *, char *, char *);
extern void e_quit (char *, char *, char *, char *);
extern void repeatcmd (char *, char *, char *, char *);
extern void do_unkey (char *, char *, char *, char *);
extern void do_unscrew (char *, char *, char *, char *);
extern void do_getout (char *, char *, char *, char *);
extern void do_mynames (char *, char *, char *, char *);
extern void my_whois (char *, char *, char *, char *);
extern void do_4op (char *, char *, char *, char *);
extern void umodecmd (char *, char *, char *, char *);
extern void do_invite (char *, char *, char *, char *);
extern void do_forward (char *, char *, char *, char *);
extern void do_oops (char *, char *, char *, char *);
extern void sendlinecmd (char *, char *, char *, char *);
extern void do_send_text (char *, char *, char *, char *);
extern void funny_stuff (char *, char *, char *, char *);
extern void cd (char *, char *, char *, char *);
extern void e_wall (char *, char *, char *, char *);
extern void send_2comm (char *, char *, char *, char *);
extern void send_comm (char *, char *, char *, char *);
extern void untopic (char *, char *, char *, char *);
extern void e_topic (char *, char *, char *, char *);
extern void send_kick (char *, char *, char *, char *);
extern void send_channel_com (char *, char *, char *, char *);
extern void quotecmd (char *, char *, char *, char *);
extern void e_privmsg (char *, char *, char *, char *);
extern void flush (char *, char *, char *, char *);
extern void oper (char *, char *, char *, char *);
extern void e_channel (char *, char *, char *, char *);
extern void who (char *, char *, char *, char *);
extern void whois (char *, char *, char *, char *);
extern void ison (char *, char *, char *, char *);
extern void userhostcmd (char *, char *, char *, char *);
extern void info (char *, char *, char *, char *);
extern void e_nick (char *, char *, char *, char *);
extern void comment (char *, char *, char *, char *);
extern void sleepcmd (char *, char *, char *, char *);
extern void version1 (char *, char *, char *, char *);
extern void ctcp (char *, char *, char *, char *);
extern void rctcp (char *, char *, char *, char *);
extern void dcc (char *, char *, char *, char *);
extern void deop (char *, char *, char *, char *);
extern void echocmd (char *, char *, char *, char *);
extern void save_settings (char *, char *, char *, char *);
extern void redirect (char *, char *, char *, char *);
extern void waitcmd (char *, char *, char *, char *);
extern void describe (char *, char *, char *, char *);
extern void me (char *, char *, char *, char *);
extern void evalcmd (char *, char *, char *, char *);
extern void hookcmd (char *, char *, char *, char *);
extern void inputcmd (char *, char *, char *, char *);
extern void pingcmd (char *, char *, char *, char *);
extern void xtypecmd (char *, char *, char *, char *);
extern void beepcmd (char *, char *, char *, char *);
extern void abortcmd (char *, char *, char *, char *);
extern void e_debug (char *, char *, char *, char *);
extern void do_scan (char *, char *, char *, char *);
extern void push_cmd (char *, char *, char *, char *);
extern void pop_cmd (char *, char *, char *, char *);
extern void unshift_cmd (char *, char *, char *, char *);
extern void shift_cmd (char *, char *, char *, char *);
extern void exec_cmd (char *, char *, char *, char *);
extern void auto_join (char *, char *, char *, char *);
extern void dcc_crash (char *, char *, char *, char *);
extern void do_msay (char *, char *, char *, char *);
extern void send_mode (char *, char *, char *, char *);
extern void do_offers (char *, char *, char *, char *);
extern void ctcp_version (char *, char *, char *, char *);
extern void about (char *, char *, char *, char *);
extern void dcc_stat_comm (char *, char *, char *, char *);
extern void sping (char *, char *, char *, char *);
extern void realname_cmd (char *, char *, char *, char *);
extern void set_username (char *, char *, char *, char *);
extern void e_call (char *, char *, char *, char *);
extern void do_toggle (char *, char *, char *, char *);
extern void e_quit (char *, char *, char *, char *);
extern void do_ig (char *, char *, char *, char *);
extern void do_listshit (char *, char *, char *, char *);
extern void savelists (char *, char *, char *, char *);
extern void mknu (char *, char *, char *, char *);
extern void reconnect_cmd (char *, char *, char *, char *);
extern void LameKick (char *, char *, char *, char *);
extern void ChanWallOp (char *, char *, char *, char *);
extern void NewUser (char *, char *, char *, char *);
extern void ReconnectServer (char *, char *, char *, char *);
extern void MegaDeop (char *, char *, char *, char *);
extern void do_flood (char *, char *, char *, char *);
extern void cycle (char *, char *, char *, char *);
extern void bomb (char *, char *, char *, char *);
extern void finger (char *, char *, char *, char *);
extern void multkick (char *, char *, char *, char *);
extern void massdeop (char *, char *, char *, char *);
extern void doop (char *, char *, char *, char *);
extern void dodeop (char *, char *, char *, char *);
extern void massop (char *, char *, char *, char *);
extern void whokill (char *, char *, char *, char *);
extern void ban (char *, char *, char *, char *);
extern void kickban (char *, char *, char *, char *);
extern void massban (char *, char *, char *, char *);
extern void dokick (char *, char *, char *, char *);
extern void nslookup (char *, char *, char *, char *);
extern void masskick (char *, char *, char *, char *);
extern void do_flood (char *, char *, char *, char *);
extern void reset (char *, char *, char *, char *);
extern void users (char *, char *, char *, char *);
extern void my_ignorehost (char *, char *, char *, char *);
extern void my_ignore (char *, char *, char *, char *);
extern void unban (char *, char *, char *, char *);
extern void masskickban (char *, char *, char *, char *);
extern void linklook (char *, char *, char *, char *);
extern void do_dump (char *, char *, char *, char *);
extern void do_dirlasttype (char *, char *, char *, char *);
extern void do_dirlistmsg (char *, char *, char *, char *);
extern void do_dirlastmsg (char *, char *, char *, char *);
extern void do_dirlastctcp (char *, char *, char *, char *);
extern void do_dirlastctcpreply (char *, char *, char *, char *);
extern void do_dirlastinvite (char *, char *, char *, char *);
extern void readlog (char *, char *, char *, char *);
extern void remove_log (char *, char *, char *, char *);
extern void add_user (char *, char *, char *, char *);
extern void bot (char *, char *, char *, char *);
extern void do_uptime (char *, char *, char *, char *);
extern void cdcc (char *, char *, char *, char *);
extern void extern_write (char *, char *, char *, char *);
extern void showuserlist (char *, char *, char *, char *);
extern void init_dcc_chat (char *, char *, char *, char *);
extern void add_shit (char *, char *, char *, char *);
extern void showshitlist (char *, char *, char *, char *);
extern void channel_stats (char *, char *, char *, char *);
extern void my_clear (char *, char *, char *, char *);
extern void stubcmd (char *, char *, char *, char *);
extern void addidle (char *, char *, char *, char *);
extern void showidle (char *, char *, char *, char *);
extern void kickidle (char *, char *, char *, char *);
extern void usage (char *, char *, char *, char *);
extern void reload_save (char *, char *, char *, char *);
extern void cset_variable (char *, char *, char *, char *);
extern void banstat (char *, char *, char *, char *);
extern void nwhois (char *, char *, char *, char *);
extern void statkgrep (char *, char *, char *, char *);
extern void tban (char *, char *, char *, char *);
extern void bantype (char *, char *, char *, char *);
extern void whowas (char *, char *, char *, char *);
extern void findports (char *, char *, char *, char *);
extern void add_ban_word (char *, char *, char *, char *);
extern void show_word_kick (char *, char *, char *, char *);
extern void clear_tab (char *, char *, char *, char *);
extern void topic_lock (char *, char *, char *, char *);
extern void mode_lock (char *, char *, char *, char *);
extern void randomnick (char *, char *, char *, char *);
extern void topic_lock (char *, char *, char *, char *);
extern void show_version (char *, char *, char *, char *);
extern void chat (char *, char *, char *, char *);
extern void back (char *, char *, char *, char *);
extern void tog_fprot (char *, char *, char *, char *);
extern void ftp (char *, char *, char *, char *);
extern void do_dirsentlastnotice (char *, char *, char *, char *);
extern void do_dirsentlastmsg (char *, char *, char *, char *);
extern void do_dirlastwall (char *, char *, char *, char *);
extern void do_dirlasttopic (char *, char *, char *, char *);
extern void do_dirsentlastwall (char *, char *, char *, char *);
extern void do_dirsentlasttopic (char *, char *, char *, char *);
extern void do_dirlastserver (char *, char *, char *, char *);
extern void botlink (char *, char *, char *, char *);
extern void jnw (char *, char *, char *, char *);
extern void lkw (char *, char *, char *, char *);
extern void whokill (char *, char *, char *, char *);
extern void csay (char *, char *, char *, char *);
extern void clink (char *, char *, char *, char *);
extern void cwho (char *, char *, char *, char *);
extern void cboot (char *, char *, char *, char *);
extern void cmsg (char *, char *, char *, char *);
extern void toggle_xlink (char *, char *, char *, char *);
extern void dcx (char *, char *, char *, char *);
extern void orig_nick (char *, char *, char *, char *);
extern void print_structs (char *, char *, char *, char *);
extern void pretend_cmd (char *, char *, char *, char *);
extern void e_pause (char *, char *, char *, char *);
extern void add_bad_nick (char *, char *, char *, char *);
extern void serv_stat (char *, char *, char *, char *);
extern void fuckem (char *, char *, char *, char *);
extern void tracekill (char *, char *, char *, char *);
extern void traceserv (char *, char *, char *, char *);
extern void dll_load (char *, char *, char *, char *);
extern void tignore (char *, char *, char *, char *);
extern void dumpcmd (char *, char *, char *, char *);
extern void aliascmd (char *, char *, char *, char *);
extern void set_autoreply (char *, char *, char *, char *);
extern void init_ftp (char *, char *, char *, char *);
extern void xdebugcmd (char *, char *, char *, char *);
extern void blesscmd (char *, char *, char *, char *);
extern void do_trace (char *, char *, char *, char *);
extern void do_stats (char *, char *, char *, char *);
extern void setenvcmd (char *, char *, char *, char *);
extern void send_kill (char *, char *, char *, char *);
extern void set_user_info (char *, char *, char *, char *);
extern void init_vars (char *, char *, char *, char *);
extern void init_window_vars (char *, char *, char *, char *);
extern void show_hash (char *, char *, char *, char *);
extern void unload (char *, char *, char *, char *);
extern void do_map (char *, char *, char *, char *);
extern void add_no_flood (char *, char *, char *, char *);
extern void s_watch (char *, char *, char *, char *);
extern void awaylog (char *, char *, char *, char *);
extern void newnick (char *, char *, char *, char *);
extern void newuser (char *, char *, char *, char *);
extern void os2menu (char *, char *, char *, char *);
extern void os2menuitem (char *, char *, char *, char *);
extern void os2submenu (char *, char *, char *, char *);
extern void fontdialog (char *, char *, char *, char *);
extern void filedialog (char *, char *, char *, char *);
extern void ame (char *, char *, char *, char *);
#ifdef WANT_DLL
extern void unload_dll (char *, char *, char *, char *);
#endif
IrcCommand *BX_find_command (char *, int *);
char *glob_commands(char *, int *, int);
#define AWAY_ONE 0
#define AWAY_ALL 1
#define STACK_POP 0
#define STACK_PUSH 1
#define STACK_SWAP 2
#define TRACE_OPER 0x01
#define TRACE_SERVER 0x02
#define TRACE_USER 0x04
#define STATS_LINK 0x001
#define STATS_CLASS 0x002
#define STATS_ILINE 0x004
#define STATS_TKLINE 0x008
#define STATS_YLINE 0x010
#define STATS_OLINE 0x020
#define STATS_HLINE 0x040
#define STATS_UPTIME 0x080
#define STATS_MLINE 0x100
#define STATS_KLINE 0x200
#define NONOVICEABBREV 0x0001
#define NOINTERACTIVE 0x0002
#define NOSIMPLESCRIPT 0x0004
#define NOCOMPLEXSCRIPT 0x0008
#define SERVERREQ 0x0010
#ifdef WANT_DLL
extern IrcCommandDll *dll_commands;
#endif
extern int will_catch_break_exceptions;
extern int will_catch_continue_exceptions;
extern int will_catch_return_exceptions;
extern int break_exception;
extern int continue_exception;
extern int return_exception;
#endif /* __edit_h_ */

703
include/config.h Normal file
View File

@@ -0,0 +1,703 @@
/*
* 'new' config.h:
* A configuration file designed to make best use of the abilities
* of ircII, and trying to make things more intuitively understandable.
*
* Done by Carl v. Loesch <lynx@dm.unirm1.it>
* Based on the 'classic' config.h by Michael Sandrof.
* Copyright(c) 1991 - See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* Warning! You will most likely have to make changes to your .ircrc file to
* use this version of IRCII! Please read the INSTALL and New2.2 files
* supplied with the distribution for details!
*
* @(#)$Id: config.h 160 2012-03-06 11:14:51Z keaston $
*/
#ifndef __config_h_
#define __config_h_
#include "defs.h"
#define OFF 0
#define ON 1
/*
* Set your favorite default server list here. This list should be a
* whitespace separated hostname:portnum:password list (with portnums and
* passwords optional). This IS NOT an optional definition. Please set this
* to your nearest servers. However if you use a seperate 'ircII.servers'
* file and the ircII can find it, this setting is overridden.
*/
#ifndef DEFAULT_SERVER
/*
* some caution is required here. the \ is a continuation char and is required
* on any servers you add into this list. also the very last server should not
* have a continuation char.
*
* List last updated: 15-Aug-2009 (caf).
*/
#define DEFAULT_SERVER "[efnet] "\
"irc.eversible.com "\
"irc.choopa.net "\
"irc.easynews.com "\
"irc.blessed.net "\
"irc.servercentral.net "\
"irc.umich.edu "\
"irc.he.net "\
"irc.mzima.net "\
"irc.paraphysics.net "\
"irc.shoutcast.com "\
"irc.vel.net "\
"irc.wh.verio.net "\
"[xsirc] "\
"irc.BitchX.org "\
"ircd.ircii.org "\
"irc.gibbed.net "\
"[ircnet US] "\
"ircnet.eversible.com "\
"ircnet.choopa.net "\
"us.ircnet.org "\
"[ircnet EU] "\
"irc.dotsrc.org "\
"uk.ircnet.org "\
"irc.xs4all.nl "\
"irc.belwue.de "\
"ircnet.nerim.fr "\
"irc.eutelia.it "\
"krakow.irc.pl "\
"ircnet.netvision.net.il "\
"[dalnet] "\
"irc.dal.net "\
"[Undernet US] "\
"Dallas.TX.US.Undernet.org "\
"mesa.az.us.undernet.org "\
"newyork.ny.us.undernet.org "\
"SantaAna.CA.US.Undernet.org "\
"Tampa.FL.US.Undernet.org "\
"[Undernet CA] "\
"Vancouver.BC.CA.Undernet.org "\
"[Undernet EU] "\
"Diemen.NL.EU.Undernet.Org "\
"Helsinki.FI.EU.Undernet.org "\
"trondheim.no.eu.undernet.org "\
"graz.at.Eu.UnderNet.org "\
"Elsene.Be.Eu.undernet.org "\
"bucharest.ro.eu.undernet.org "\
"Ede.NL.EU.UnderNet.Org "\
"oslo.no.eu.undernet.org "\
"Zagreb.Hr.EU.UnderNet.org "\
"Lelystad.NL.EU.UnderNet.Org "\
"[Anynet] "\
"irc.bluecherry.net "\
"irc.irule.net "\
"[AfterNet] "\
"irc.afternet.org "\
"[oftc] "\
"irc.oftc.net "\
"[SlashNET] "\
"pinky.slashnet.org "\
"blago.slashnet.org "\
"moo.slashnet.org "\
"coruscant.slashnet.org "
#endif
/*
* You must always define this. If you can't compile glob.c, let us know.
*/
#define NEED_GLOB
/* On some channels mass modes can be confusing and in some case
* spectacular so in the interest of keeping sanity, Jordy added this
* mode compressor to the client. It reduces the duplicate modes that
* might occur on a channel.. it's explained in names.c much better.
*/
#define COMPRESS_MODES
/*
* Uncomment the following if the gecos field of your /etc/passwd has other
* information in it that you don't want as the user name (such as office
* locations, phone numbers, etc). The default delimiter is a comma, change
* it if you need to. If commented out, the entire gecos field is used.
*/
#define GECOS_DELIMITER ','
/*
* MAIL_DELIMITER specifies the unique text that separates one mail message
* from another in the mail spool file when using UNIX_MAIL.
*/
#define MAIL_DELIMITER "From "
/*
* Uncomment the following to make ircII read a list of irc servers from
* the ircII.servers file in the ircII library. This file should be
* whitespace separated hostname:portnum*password (with the portnum and
* password being optional). This server list will supercede the
* DEFAULT_SERVER.
*/
#if defined(WINNT) || defined(__EMX__)
#define SERVERS_FILE "irc-serv"
#else
#define SERVERS_FILE "ircII.servers"
#endif
/*
* Certain versions of Tcl lib have a PLUS version which preloads the scripts
* into the binary so that the script directory is not required to run the
* tcllib. This offers some benefit at the expense of a slightly larger binary.
*/
#undef TCL_PLUS
/*
* we define the default network type for server groups. Do not just
* undefine this.
*/
#define DEFAULT_NETWORK "efnet"
/*
* Below are the IRCII variable defaults. For boolean variables, use 1 for
* ON and 0 for OFF. You may set string variable to NULL if you wish them to
* have no value. None of these are optional. You may *not* comment out or
* remove them. They are default values for variables and are required for
* proper compilation.
*/
#if !defined(__EMX__) && !defined(WINNT)
/* if this file has something in it, then we'll use it instead. */
#include "../.config.h"
#endif
#if !defined(_USE_LOCAL_CONFIG)
/* NO _USE_LOCAL_CONFIG so use these instead */
/* On some channels mass modes can be confusing and in some case
* spectacular so in the interest of keeping sanity, Jordy added this
* mode compressor to the client. It reduces the duplicate modes that
* might occur on a channel.. it's explained in names.c much better.
*/
#define COMPRESS_MODES
/*
* Define this if you want the $glob() function to be in your client.
* There is a case for having this functino and a case against having
* this function:
*
* Pro: makes it easier to write scripts like xdcc, since they can easily
* get at the filenames in your xdcc directory
* ConS8 with $unlink(), $rmdir(), etc, it makes it that much easier for
* a backdoor to do damage to your account.
*
* You will have to weigh the evidence and decide if you want to include it.
*/
#define INCLUDE_GLOB_FUNCTION
/* crisk graciously allowed me to include his hebrew modification to ircII
* in the client. defining this variable to 1 allows that happen. It also
* adds a HEBREW_TOGGLE variable which can turn this feature on/off
*/
#undef WANT_HEBREW
/* if you use cidentd the filename is called .authlie instead of .noident.
* as well some modifications to the format of the file were made. So we
* require some pre-knowledge of what to expect. WinNT identd servers will
* also require this.
*/
/* one or the other of these. not both */
#undef CIDENTD
#undef WDIDENT
/*
* Define this if your using a hacked ident and want to fake your username.
* maybe we could also use this to specify what file to write this hack to.
* Some examples are ~/.noident and ~/.authlie
*/
#undef IDENT_FAKE
/*
* 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 (no, i dont have plans to fix it =)
* window create doesn't make any sense on Windows 95/NT.
*/
#if !defined(GUI) && defined(WINNT)
#undef WINDOW_CREATE
#else
#define WINDOW_CREATE
#endif
/*
* 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.
*/
#define MIRC_BROKEN_DCC_RESUME ON
/*
* Set the following to 1 if you wish for IRCII not to disturb the tty's flow
* control characters as the default. Normally, these are ^Q and ^S. You
* may have to rebind them in IRCII. Set it to 0 for IRCII to take over the
* tty's flow control.
*/
#define USE_FLOW_CONTROL ON
/*
* Make ^Z stop the irc process by default, if undefined, ^Z will self-insert
* by default
*/
#define ALLOW_STOP_IRC
/* And here is the port number for default client connections. */
#define IRC_PORT 6667
/*
* If you define UNAME_HACK, the uname information displayed in the
* CTCP VERSION info will appear as "*IX" irregardless of any other
* settings. Useful for paranoid users who dont want others to know
* that theyre running a buggy SunOS machine. >;-)
*/
#undef UNAME_HACK
/*
* If you define ONLY_STD_CHARS, only "normal" characters will displayed.
* This is recommended when you want to start BitchX in an xterm without
* the usage of the special "vga"-font.
*/
#undef ONLY_STD_CHARS
/*
* Normally BitchX uses only the IBMPC (cp437) charset.
* Define LATIN1, if you want to see the standard Latin1 characters
* (i.e. <20> <20> <20> <20> <20> <20> <20> <-> "A "O "U "a "o "u \qs ).
*
* You will still be able to see ansi graphics, but there will be some
* smaller problems (i.e. after a PageUp).
*
* If you use xterm there is no easy way to use both fonts at the same
* time. You have to decide if you use the standard (latin1) fonts or
* vga.pcf (cp437).
*
* Is here there any solution to use both fonts nethertheless ?
*/
#undef LATIN1
/*
* If you use LINUX and non ISO8859-1 fonts with custom screen mapping,
* and if your see some pseudographics instead of your national characters,
* define this to solve the problem.
*
*/
#undef CHARSET_CUSTOM
/*
* If you want the non-ansi BitchX logo only define this ASCII_LOGO
*
* Note: On the console ansi graphics can be displayed just fine, even
* when you've defined LATIN1. The problem is that ansi graphics will look
* ugly if you use the scroll up feature (PageUp/PageDown)
*/
#undef ASCII_LOGO
/* If you define REVERSE_WHITE_BLACK, then the format codes for black and
* white color are revepsed. (%W, %w is bold black and black, %K, %k is bold
* white and white). This way the default format-strings are readable on
* a display with white background and black foreground.
*/
#undef REVERSE_WHITE_BLACK
/*
* Define this if you want support for ircII translation tables.
*/
#define TRANSLATE
/*
* WinNT and EMX probably need an ident server, so define this unless you have
* an external one, or don't want ident support (bad idea).
*/
#if defined(WINNT) || defined(__EMX__)
#define WANT_IDENTD
#endif
/*
* Define the name of your ircrc file here.
*/
#if defined(WINNT) || defined(__EMX__)
#define IRCRC_NAME "/irc-rc"
#else
#define IRCRC_NAME "/.ircrc"
#endif
#define DEFAULT_PING_TYPE 1
#define DEFAULT_MSGLOG ON
#define DEFAULT_AUTO_NSLOOKUP OFF
#define DEFAULT_ALT_CHARSET ON
#define DEFAULT_FLOOD_KICK ON
#define DEFAULT_FLOOD_PROTECTION ON
#define DEFAULT_CTCP_FLOOD_PROTECTION ON
#define DEFAULT_MAX_AUTOGET_SIZE 2000000
#define DEFAULT_LLOOK_DELAY 120
#define DEFAULT_ALWAYS_SPLIT_BIGGEST ON
#define DEFAULT_AUTO_UNMARK_AWAY OFF
#define DEFAULT_AUTO_WHOWAS OFF
#define DEFAULT_BANTIME 600
#define DEFAULT_BEEP ON
#define DEFAULT_BEEP_MAX 3
#define DEFAULT_BEEP_WHEN_AWAY OFF
#define DEFAULT_BOLD_VIDEO ON
#define DEFAULT_BLINK_VIDEO ON
#define DEFAULT_CHANNEL_NAME_WIDTH 10
#define DEFAULT_CLOCK ON
#define DEFAULT_CLOCK_24HOUR OFF
#define DEFAULT_COMMAND_MODE OFF
#define DEFAULT_COMMENT_HACK ON
#define DEFAULT_DCC_BLOCK_SIZE 2048
#define DEFAULT_DISPLAY ON
#define DEFAULT_DO_NOTIFY_IMMEDIATELY ON
#define DEFAULT_EIGHT_BIT_CHARACTERS ON
#define DEFAULT_EXEC_PROTECTION ON
#define DEFAULT_FLOOD_AFTER 4
#define DEFAULT_FLOOD_RATE 5
#define DEFAULT_FLOOD_USERS 10
#define DEFAULT_FLOOD_WARNING OFF
#define DEFAULT_FULL_STATUS_LINE ON
#define DEFAULT_HELP_PAGER ON
#define DEFAULT_HELP_PROMPT ON
#define DEFAULT_HIGH_BIT_ESCAPE OFF
#define DEFAULT_HIDE_PRIVATE_CHANNELS OFF
#define DEFAULT_HISTORY 100
#define DEFAULT_HOLD_MODE OFF
#define DEFAULT_HOLD_MODE_MAX 0
#define DEFAULT_INDENT ON
#define DEFAULT_INPUT_ALIASES OFF
#define DEFAULT_INSERT_MODE ON
#define DEFAULT_INVERSE_VIDEO ON
#define DEFAULT_LASTLOG 1000
#define DEFAULT_LOG OFF
#define DEFAULT_MAIL 2
#define DEFAULT_NO_CTCP_FLOOD ON
#define DEFAULT_NOTIFY_HANDLER "QUIET"
#define DEFAULT_NOTIFY_INTERVAL 60
#define DEFAULT_NOTIFY_LEVEL "ALL DCC"
#define DEFAULT_NOTIFY_ON_TERMINATION OFF
#define DEFAULT_NOTIFY_USERHOST_AUTOMATIC ON
#define DEFAULT_SCROLL_LINES ON
#define DEFAULT_SEND_IGNORE_MSG OFF
#define DEFAULT_SEND_OP_MSG ON
#define DEFAULT_SHELL_LIMIT 0
#define DEFAULT_SHOW_AWAY_ONCE ON
#define DEFAULT_SHOW_CHANNEL_NAMES ON
#define DEFAULT_SHOW_END_OF_MSGS OFF
#define DEFAULT_SHOW_NUMERICS OFF
#define DEFAULT_SHOW_STATUS_ALL OFF
#define DEFAULT_SHOW_WHO_HOPCOUNT OFF
#define DEFAULT_META_STATES 5
#define DEFAULT_IGNORE_TIME 600
#define DEFAULT_MAX_DEOPS 2
#define DEFAULT_MAX_IDLEKICKS 2
#define DEFAULT_NUM_BANMODES 4
#define DEFAULT_NUM_KICKS 1
#define DEFAULT_NUM_OF_WHOWAS 4
#define DEFAULT_NUM_OPMODES 4
#define DEFAULT_SEND_AWAY_MSG OFF
#define DEFAULT_SEND_CTCP_MSG ON
#define DEFAULT_SOCKS_PORT 1080
#define DEFAULT_AUTO_AWAY_TIME 600
#define DEFAULT_AUTO_RECONNECT ON
#define DEFAULT_AUTO_UNBAN 600
#define DEFAULT_CDCC ON
#define DEFAULT_CDCC_FLOOD_AFTER 3
#define DEFAULT_CDCC_FLOOD_RATE 4
#define DEFAULT_CTCP_DELAY 3
#define DEFAULT_CTCP_FLOOD_BAN ON
#define DEFAULT_DCC_AUTORENAME ON
#define DEFAULT_DCC_AUTORESUME OFF
#define DEFAULT_DCC_AUTORENAME_ON_NICKNAME OFF
#define DEFAULT_DCC_BAR_TYPE 0 /* 0 or 1 */
#define DEFAULT_DOUBLE_STATUS_LINE ON
#define DEFAULT_FTP_GRAB OFF
#define DEFAULT_HTTP_GRAB OFF
#define DEFAULT_HELP_WINDOW OFF
#define DEFAULT_NICK_COMPLETION ON
#define DEFAULT_NICK_COMPLETION_CHAR ':'
#define DEFAULT_NICK_COMPLETION_LEN 2
#define DEFAULT_NICK_COMPLETION_TYPE 0 /* 0 1 2 */
#define DEFAULT_NOTIFY ON
#define DEFAULT_QUEUE_SENDS 0
#define DEFAULT_MAX_SERVER_RECONNECT 2
#define DEFAULT_SERVER_GROUPS OFF
#define DEFAULT_WINDOW_DESTROY_PART OFF
#define DEFAULT_WINDOW_DESTROY_QUERY OFF
#define DEFAULT_SUPPRESS_SERVER_MOTD ON
#define DEFAULT_TAB ON
#define DEFAULT_TAB_MAX 8
#define DEFAULT_TIMESTAMP OFF
#define DEFAULT_TIMESTAMP_AWAYLOG_HOURLY ON
#define DEFAULT_TIMESTAMP_STR "%I:%M%p "
#define DEFAULT_UNDERLINE_VIDEO ON
#define DEFAULT_VERBOSE_CTCP ON
#define DEFAULT_DISPLAY_ANSI ON
#define DEFAULT_DISPLAY_PC_CHARACTERS 4
#define DEFAULT_DCC_AUTOGET OFF
#define DEFAULT_DCC_GET_LIMIT 0
#define DEFAULT_DCC_SEND_LIMIT 5
#define DEFAULT_DCC_QUEUE_LIMIT 10
#define DEFAULT_DCC_LIMIT 10
#define DEFAULT_DCCTIMEOUT 600
#define DEFAULT_FLOATING_POINT_MATH OFF
#define DEFAULT_LLOOK OFF
#define DEFAULT_CLOAK OFF
#define DEFAULT_AINV 0
#define DEFAULT_ANNOY_KICK OFF
#define DEFAULT_AOP_VAR OFF
#define DEFAULT_AUTO_AWAY ON
#define DEFAULT_KICK_OPS ON
#define DEFAULT_AUTO_REJOIN ON
#define DEFAULT_DEOPFLOOD ON
#if defined(__EMXPM__) || defined(WIN32)
#define DEFAULT_CODEPAGE 437
#endif
#define DEFAULT_CTCP_FLOOD_AFTER 3
#define DEFAULT_CTCP_FLOOD_RATE 10
#define DEFAULT_DEOPFLOOD_TIME 30
#define DEFAULT_DEOP_ON_DEOPFLOOD 3
#define DEFAULT_DEOP_ON_KICKFLOOD 3
#define DEFAULT_KICK_IF_BANNED OFF
#define DEFAULT_HACKING 0 /* 0 1 2 */
#define DEFAULT_JOINFLOOD ON
#define DEFAULT_JOINFLOOD_TIME 50
#define DEFAULT_KICKFLOOD ON
#define DEFAULT_KICKFLOOD_TIME 30
#define DEFAULT_KICK_ON_DEOPFLOOD 3
#define DEFAULT_KICK_ON_JOINFLOOD 4
#define DEFAULT_KICK_ON_KICKFLOOD 4
#define DEFAULT_KICK_ON_NICKFLOOD 3
#define DEFAULT_KICK_ON_PUBFLOOD 30
#define DEFAULT_NICKFLOOD ON
#define DEFAULT_NICKFLOOD_TIME 30
#ifdef __EMXPM__
#define DEFAULT_NICKLIST 10
#else
#define DEFAULT_NICKLIST 100
#endif
#define DEFAULT_NICKLIST_SORT 0
#define DEFAULT_LAME_IDENT OFF
#define DEFAULT_LAMELIST ON
#define DEFAULT_SHITLIST ON
#define DEFAULT_USERLIST ON
#define DEFAULT_PUBFLOOD OFF
#define DEFAULT_PUBFLOOD_TIME 20
#define DEFAULT_CONNECT_DELAY 1
#define DEFAULT_CONNECT_TIMEOUT 30
#define DEFAULT_STATUS_NO_REPEAT ON
#define DEFAULT_STATUS_DOES_EXPANDOS OFF
#define DEFAULT_DISPATCH_UNKNOWN_COMMANDS OFF
#define DEFAULT_SCROLLBACK_LINES 512
#define DEFAULT_SCROLLBACK_RATIO 50
#define DEFAULT_SCROLLERBARS ON
#define DEFAULT_ND_SPACE_MAX 160
#define DEFAULT_CPU_SAVER_AFTER 0
#define DEFAULT_CPU_SAVER_EVERY 0
#define DEFAULT_NO_FAIL_DISCONNECT OFF
#define DEFAULT_MAX_URLS 20 /* this defines the MAX number of urls saved */
#undef BITCHX_LITE
#undef EMACS_KEYBINDS /* change this is you have problems with
* your keyboard
*/
#define EXEC_COMMAND
#undef PUBLIC_ACCESS /*
* this define removes /load /exec commands
*/
#define DEFAULT_OPERVIEW_HIDE 0 /* defines the operview window. if hidden or not */
#define WANT_OPERVIEW ON
#define WANT_EPICHELP ON /* epic help command. /ehelp. */
#define WANT_LLOOK ON /* do we want built-in llooker. */
#define WANT_CDCC ON /* do we want the cdcc system */
#define WANT_FTP ON /* do we want the ftp dcc comamnd */
#if defined(HAVE_RESOLV) && defined(HAVE_ARPA_NAMESER_H) && defined(HAVE_RESOLV_H)
#define WANT_NSLOOKUP ON
#else
#undef WANT_NSLOOKUP
#endif
#define WANT_TABKEY ON
#define WANT_CHELP ON
#define WANT_USERLIST ON
#undef HUMBLE /* define this for a hades look */
#define WANT_DETACH OFF /* this is here for the detach/re-attach code
which is essentially a mini-screen */
#define ALLOW_DETACH ON
#define DEFAULT_DETACH_ON_HUP OFF
#undef OLD_RANDOM_BEHAVIOR /* semi randomness for random() */
#ifdef WANT_OPERVIEW
#define DEFAULT_OPER_VIEW OFF
#endif
#if defined(NON_BLOCKING_CONNECTS)
#define DEFAULT_DCC_FAST ON
#else
#define DEFAULT_DCC_FAST OFF
#endif
#endif
/* _USE_LOCAL_CONFIG */
#define DEFAULT_KICK_REASON "Bitch-X BaBy!"
#define DEFAULT_PROTECT_CHANNELS "*"
#define DEFAULT_SHITLIST_REASON "Surplus Lamerz must go!!!!"
#define DEFAULT_BEEP_ON_MSG "MSGS"
#define DEFAULT_CMDCHARS "/"
#define DEFAULT_CONTINUED_LINE " "
#define DEFAULT_HIGHLIGHT_CHAR "INVERSE"
#define DEFAULT_LASTLOG_LEVEL "ALL"
#define DEFAULT_MSGLOG_LEVEL "MSGS NOTICES SEND_MSG"
#define DEFAULT_LOGFILE "IrcLog"
#define DEFAULT_SHELL "/bin/sh"
#define DEFAULT_SHELL_FLAGS "-c"
#define DEFAULT_USERINFO ""
#define DEFAULT_XTERM "rxvt"
#define DEFAULT_XTERM_OPTIONS "-bg black -fg white"
#define DEFAULT_DCC_DLDIR "~"
#define DEFAULT_PAD_CHAR ' '
#define DEFAULT_USERMODE "+iw" /* change this to the default usermode */
#define DEFAULT_OPERMODE "swfck"
#define DEFAULT_CHANMODE "+nt" /* default channel mode */
#define DEFAULT_SWATCH "KILLS,CLIENTS,TRAFFIC,REHASH,KLINE,BOTS,OPER,SQUIT,SERVER,CONNECT,FLOOD,USER,STATS,NICK,ACTIVEK"
#define DEFAULT_WORD_BREAK " \t"
#define DEFAULT_JOIN_NEW_WINDOW 0
#define DEFAULT_QUERY_NEW_WINDOW 0
#ifdef GUI
#define DEFAULT_JOIN_NEW_WINDOW_TYPE "create hide swap last double on split on"
#define DEFAULT_QUERY_NEW_WINDOW_TYPE "create hide swap last double on split on"
#else
#define DEFAULT_JOIN_NEW_WINDOW_TYPE "new hide_others double on"
#define DEFAULT_QUERY_NEW_WINDOW_TYPE "new hide_others double on"
#endif
#define DEFAULT_MDI OFF
#ifdef __EMX__
#define DEFAULT_FONT "6x10"
#elif defined(GTK)
#define DEFAULT_FONT "vga"
#else
#define DEFAULT_FONT "-fn vga11x19"
#endif
/*#define CLOAKED "emacs"*/ /*
* define this to the program you want to
* show up in "ps" and "top" to hide irc
* from evil sys-admins.
*/
#if !defined(NON_BLOCKING_CONNECTS) && defined(DEFAULT_DCC_FAST)
#undef DEFAULT_DCC_FAST
#define DEFAULT_DCC_FAST OFF
#endif
#if defined LATIN1
/* Make sure the keyboard works */
#undef EMACS_KEYBINDS
/* No line chars available, so better define this: */
#define ONLY_STD_CHARS 1
#endif
/*
* on certain systems we can define NON_BLOCKING to 1
* connects are then done alot differantly. We can perform actual work
* in the background, while connecting. This also protects us from certain
* "bombs" that are available. If you have trouble with this undef
* the NON_BLOCKING_CONNECTS. DCC sends/gets are much improved with this.
*/
#if defined(HEBREW) && !defined(TRANSLATE)
#define TRANSLATE 1
#endif
#if defined(TRANSLATE) && !defined(HEBREW)
#define HEBREW 1
#endif
#if defined(PUBLIC_ACCESS)
#undef EXEC_COMMAND
#undef WANT_TCL
#undef WANT_FTP
#endif
#if defined(WINNT) || defined(__EMX__) || defined(GUI)
#undef WANT_DETACH
#endif
/*
* This is the filename of the identd file to use
*/
#ifdef CIDENTD
#define DEFAULT_IDENT_HACK ".authlie"
#elif defined(WDIDENT)
#define DEFAULT_IDENT_HACK ".noident"
#else
#define DEFAULT_IDENT_HACK ".noident"
#endif
#if !defined(WANT_CHATNET)
#undef WANT_CHATNET /* define just for codelogic */
#endif
#if defined(_USE_LOCAL_CONFIG) && !defined(SHOULD_NOTIFY_BITCHX_COM)
#undef WANT_NOTIFY_BITCHX_COM
#endif
#undef PARANOID /* #define this if your paranoid about dcc hijacking */
#undef WANT_CHAN_NICK_SERV /* do we want to include some chan/nick/oper server commands */
/* new epic stuff */
#define OLD_STATUS_S_EXPANDO_BEHAVIOR
#define DEFAULT_NEW_SERVER_LASTLOG_LEVEL "NONE"
#define DEFAULT_RANDOM_LOCAL_PORTS 0
#define DEFAULT_RANDOM_SOURCE 0
#define DEFAULT_TERM_DOES_BRIGHT_BLINK 0
#if defined(BITCHX_LITE) && defined(WANT_TCL)
#undef BITCHX_LITE
#endif
#if defined(BITCHX_LITE)
#undef WANT_DLL
#undef WANT_TRANSLATE
#undef WANT_DETACH
#undef WANT_NSLOOKUP
#undef HEBREW
#undef CLOAKED
#undef WANT_OPERVIEW
#undef WANT_EPICHELP
#undef WANT_LLOOK
#undef WANT_CDCC
#undef WANT_FTP
#undef WANT_TABKEY
#undef WANT_CHELP
#undef WANT_USERLIST
#undef COMPRESS_MODES
#undef ALLOW_DETACH
#endif
#define DEFAULT_TKLINE_TIME 10
#define DEFAULT_BOTCHAR '.' /* default char to enter dcc chat. */
/* oper serv's tend to send .'s */
#define WANT_CORE
#undef OFF
#undef ON
#include "color.h" /* all color options here. */
#endif /* __config_h_ */

444
include/cset.h Normal file
View File

@@ -0,0 +1,444 @@
/*
* cset.h: header for cset.c
*/
#ifndef _CSET_H_
#define _CSET_H_
#include "struct.h"
/* This ensures we always have the offsetof() macro */
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
/* the types of IrcVariables (repeated in vars.h) */
#define BOOL_TYPE_VAR 0
#define CHAR_TYPE_VAR 1
#define INT_TYPE_VAR 2
#define STR_TYPE_VAR 3
/* var_settings indexes ... also used in display.c for highlights */
#define OFF 0
#define ON 1
#define TOGGLE 2
enum CSET_TYPES
{
AINV_CSET,
ANNOY_KICK_CSET,
AOP_CSET,
AUTO_JOIN_ON_INVITE_CSET,
AUTO_LIMIT_CSET,
AUTO_REJOIN_CSET,
BANTIME_CSET,
BITCH_CSET,
CHANMODE_CSET,
CHANNEL_LOG_CSET,
CHANNEL_LOG_FILE_CSET,
CHANNEL_LOG_LEVEL_CSET,
COMPRESS_MODES_CSET,
CTCP_FLOOD_BAN_CSET,
DEOPFLOOD_CSET,
DEOPFLOOD_TIME_CSET,
DEOP_ON_DEOPFLOOD_CSET,
DEOP_ON_KICKFLOOD_CSET,
HACKING_CSET,
JOINFLOOD_CSET,
JOINFLOOD_TIME_CSET,
KICKFLOOD_CSET,
KICKFLOOD_TIME_CSET,
KICK_IF_BANNED_CSET,
KICK_ON_DEOPFLOOD_CSET,
KICK_ON_JOINFLOOD_CSET,
KICK_ON_KICKFLOOD_CSET,
KICK_ON_NICKFLOOD_CSET,
KICK_ON_PUBFLOOD_CSET,
KICK_OPS_CSET,
LAMEIDENT_CSET,
LAMELIST_CSET,
NICKFLOOD_CSET,
NICKFLOOD_TIME_CSET,
PUBFLOOD_CSET,
PUBFLOOD_IGNORE_TIME_CSET,
PUBFLOOD_TIME_CSET,
SHITLIST_CSET,
USERLIST_CSET,
NUMBER_OF_CSETS
};
enum WSET_TYPES
{
STATUS_AWAY_WSET,
STATUS_CDCCCOUNT_WSET,
STATUS_CHANNEL_WSET,
STATUS_CHANOP_WSET,
STATUS_CLOCK_WSET,
STATUS_CPU_SAVER_WSET,
STATUS_DCCCOUNT_WSET,
STATUS_FLAG_WSET,
STATUS_FORMAT_WSET,
STATUS_FORMAT1_WSET,
STATUS_FORMAT2_WSET,
STATUS_FORMAT3_WSET,
STATUS_HALFOP_WSET,
STATUS_HOLD_WSET,
STATUS_HOLD_LINES_WSET,
STATUS_LAG_WSET,
STATUS_MAIL_WSET,
STATUS_MODE_WSET,
STATUS_MSGCOUNT_WSET,
STATUS_NICKNAME_WSET,
STATUS_NOTIFY_WSET,
STATUS_OPER_KILLS_WSET,
STATUS_QUERY_WSET,
STATUS_SCROLLBACK_WSET,
STATUS_SERVER_WSET,
STATUS_TOPIC_WSET,
STATUS_UMODE_WSET,
STATUS_USER0_WSET,
STATUS_USER1_WSET,
STATUS_USER10_WSET,
STATUS_USER11_WSET,
STATUS_USER12_WSET,
STATUS_USER13_WSET,
STATUS_USER14_WSET,
STATUS_USER15_WSET,
STATUS_USER16_WSET,
STATUS_USER17_WSET,
STATUS_USER18_WSET,
STATUS_USER19_WSET,
STATUS_USER2_WSET,
STATUS_USER20_WSET,
STATUS_USER21_WSET,
STATUS_USER22_WSET,
STATUS_USER23_WSET,
STATUS_USER24_WSET,
STATUS_USER25_WSET,
STATUS_USER26_WSET,
STATUS_USER27_WSET,
STATUS_USER28_WSET,
STATUS_USER29_WSET,
STATUS_USER3_WSET,
STATUS_USER30_WSET,
STATUS_USER31_WSET,
STATUS_USER32_WSET,
STATUS_USER33_WSET,
STATUS_USER34_WSET,
STATUS_USER35_WSET,
STATUS_USER36_WSET,
STATUS_USER37_WSET,
STATUS_USER38_WSET,
STATUS_USER39_WSET,
STATUS_USER4_WSET,
STATUS_USER5_WSET,
STATUS_USER6_WSET,
STATUS_USER7_WSET,
STATUS_USER8_WSET,
STATUS_USER9_WSET,
STATUS_USERS_WSET,
STATUS_VOICE_WSET,
STATUS_WINDOW_WSET,
NUMBER_OF_WSETS
};
enum FSET_TYPES
{
FORMAT_ACTION_FSET,
FORMAT_ACTION_AR_FSET,
FORMAT_ACTION_CHANNEL_FSET,
FORMAT_ACTION_OTHER_FSET,
FORMAT_ACTION_OTHER_AR_FSET,
FORMAT_ACTION_USER_FSET,
FORMAT_ACTION_USER_AR_FSET,
FORMAT_ALIAS_FSET,
FORMAT_ASSIGN_FSET,
FORMAT_AWAY_FSET,
FORMAT_BACK_FSET,
FORMAT_BANS_FSET,
FORMAT_BANS_FOOTER_FSET,
FORMAT_BANS_HEADER_FSET,
FORMAT_BITCH_FSET,
FORMAT_BOT_FSET,
FORMAT_BOT_FOOTER_FSET,
FORMAT_BOT_HEADER_FSET,
FORMAT_BWALL_FSET,
FORMAT_CHANNEL_SIGNOFF_FSET,
FORMAT_CHANNEL_URL_FSET,
FORMAT_COMPLETE_FSET,
FORMAT_CONNECT_FSET,
FORMAT_CSET_FSET,
FORMAT_CTCP_FSET,
FORMAT_CTCP_CLOAK_FSET,
FORMAT_CTCP_CLOAK_FUNC_FSET,
FORMAT_CTCP_CLOAK_FUNC_USER_FSET,
FORMAT_CTCP_CLOAK_UNKNOWN_FSET,
FORMAT_CTCP_CLOAK_UNKNOWN_USER_FSET,
FORMAT_CTCP_CLOAK_USER_FSET,
FORMAT_CTCP_FUNC_FSET,
FORMAT_CTCP_FUNC_USER_FSET,
FORMAT_CTCP_REPLY_FSET,
FORMAT_CTCP_UNKNOWN_FSET,
FORMAT_CTCP_UNKNOWN_USER_FSET,
FORMAT_CTCP_USER_FSET,
FORMAT_DCC_FSET,
FORMAT_DCC_CHAT_FSET,
FORMAT_DCC_CONNECT_FSET,
FORMAT_DCC_ERROR_FSET,
FORMAT_DCC_LOST_FSET,
FORMAT_DCC_REQUEST_FSET,
FORMAT_DESYNC_FSET,
FORMAT_DISCONNECT_FSET,
FORMAT_EBANS_FSET,
FORMAT_EBANS_FOOTER_FSET,
FORMAT_EBANS_HEADER_FSET,
FORMAT_ENCRYPTED_NOTICE_FSET,
FORMAT_ENCRYPTED_PRIVMSG_FSET,
FORMAT_FLOOD_FSET,
FORMAT_FRIEND_JOIN_FSET,
FORMAT_HELP_FSET,
FORMAT_HOOK_FSET,
FORMAT_IGNORE_INVITE_FSET,
FORMAT_IGNORE_MSG_FSET,
FORMAT_IGNORE_MSG_AWAY_FSET,
FORMAT_IGNORE_NOTICE_FSET,
FORMAT_IGNORE_WALL_FSET,
FORMAT_INVITE_FSET,
FORMAT_INVITE_USER_FSET,
FORMAT_JOIN_FSET,
FORMAT_KICK_FSET,
FORMAT_KICK_USER_FSET,
FORMAT_KILL_FSET,
FORMAT_LASTLOG_FSET,
FORMAT_LEAVE_FSET,
FORMAT_LINKS_FSET,
FORMAT_LIST_FSET,
FORMAT_MAIL_FSET,
FORMAT_MODE_FSET,
FORMAT_MODE_CHANNEL_FSET,
FORMAT_MSG_FSET,
FORMAT_MSGCOUNT_FSET,
FORMAT_MSGLOG_FSET,
FORMAT_MSG_GROUP_FSET,
FORMAT_NAMES_FSET,
FORMAT_NAMES_BANNER_FSET,
FORMAT_NAMES_BOT_FSET,
FORMAT_NAMES_FOOTER_FSET,
FORMAT_NAMES_FRIEND_FSET,
FORMAT_NAMES_IRCOP_FSET,
FORMAT_NAMES_NICK_FSET,
FORMAT_NAMES_NICK_BOT_FSET,
FORMAT_NAMES_NICK_FRIEND_FSET,
FORMAT_NAMES_NICK_ME_FSET,
FORMAT_NAMES_NICK_SHIT_FSET,
FORMAT_NAMES_NONOP_FSET,
FORMAT_NAMES_OP_FSET,
FORMAT_NAMES_SHIT_FSET,
FORMAT_NAMES_USER_FSET,
FORMAT_NAMES_USER_CHANOP_FSET,
FORMAT_NAMES_USER_IRCOP_FSET,
FORMAT_NAMES_USER_VOICE_FSET,
FORMAT_NAMES_VOICE_FSET,
FORMAT_NETADD_FSET,
FORMAT_NETJOIN_FSET,
FORMAT_NETSPLIT_FSET,
FORMAT_NETSPLIT_HEADER_FSET,
FORMAT_NICKNAME_FSET,
FORMAT_NICKNAME_OTHER_FSET,
FORMAT_NICKNAME_USER_FSET,
FORMAT_NICK_AUTO_FSET,
FORMAT_NICK_COMP_FSET,
FORMAT_NICK_MSG_FSET,
FORMAT_NONICK_FSET,
FORMAT_NOTE_FSET,
FORMAT_NOTICE_FSET,
FORMAT_NOTIFY_OFF_FSET,
FORMAT_NOTIFY_ON_FSET,
FORMAT_NOTIFY_SIGNOFF_FSET,
FORMAT_NOTIFY_SIGNON_FSET,
FORMAT_OPER_FSET,
FORMAT_OV_FSET,
FORMAT_PASTE_FSET,
FORMAT_PUBLIC_FSET,
FORMAT_PUBLIC_AR_FSET,
FORMAT_PUBLIC_MSG_FSET,
FORMAT_PUBLIC_MSG_AR_FSET,
FORMAT_PUBLIC_NOTICE_FSET,
FORMAT_PUBLIC_NOTICE_AR_FSET,
FORMAT_PUBLIC_OTHER_FSET,
FORMAT_PUBLIC_OTHER_AR_FSET,
FORMAT_REL_FSET,
FORMAT_RELM_FSET,
FORMAT_RELN_FSET,
FORMAT_RELS_FSET,
FORMAT_RELSM_FSET,
FORMAT_RELSN_FSET,
FORMAT_SEND_ACTION_FSET,
FORMAT_SEND_ACTION_OTHER_FSET,
FORMAT_SEND_AWAY_FSET,
FORMAT_SEND_CTCP_FSET,
FORMAT_SEND_DCC_CHAT_FSET,
FORMAT_SEND_ENCRYPTED_MSG_FSET,
FORMAT_SEND_ENCRYPTED_NOTICE_FSET,
FORMAT_SEND_MSG_FSET,
FORMAT_SEND_NOTICE_FSET,
FORMAT_SEND_PUBLIC_FSET,
FORMAT_SEND_PUBLIC_OTHER_FSET,
FORMAT_SERVER_FSET,
FORMAT_SERVER_MSG1_FSET,
FORMAT_SERVER_MSG1_FROM_FSET,
FORMAT_SERVER_MSG2_FSET,
FORMAT_SERVER_MSG2_FROM_FSET,
FORMAT_SERVER_NOTICE_FSET,
FORMAT_SERVER_NOTICE_BOT_FSET,
FORMAT_SERVER_NOTICE_BOT1_FSET,
FORMAT_SERVER_NOTICE_BOT_ALARM_FSET,
FORMAT_SERVER_NOTICE_CLIENT_CONNECT_FSET,
FORMAT_SERVER_NOTICE_CLIENT_EXIT_FSET,
FORMAT_SERVER_NOTICE_CLIENT_INVALID_FSET,
FORMAT_SERVER_NOTICE_CLIENT_TERM_FSET,
FORMAT_SERVER_NOTICE_FAKE_FSET,
FORMAT_SERVER_NOTICE_GLINE_FSET,
FORMAT_SERVER_NOTICE_KILL_FSET,
FORMAT_SERVER_NOTICE_KILL_LOCAL_FSET,
FORMAT_SERVER_NOTICE_KLINE_FSET,
FORMAT_SERVER_NOTICE_NICK_COLLISION_FSET,
FORMAT_SERVER_NOTICE_OPER_FSET,
FORMAT_SERVER_NOTICE_REHASH_FSET,
FORMAT_SERVER_NOTICE_STATS_FSET,
FORMAT_SERVER_NOTICE_TRAFFIC_HIGH_FSET,
FORMAT_SERVER_NOTICE_TRAFFIC_NORM_FSET,
FORMAT_SERVER_NOTICE_UNAUTH_FSET,
FORMAT_SET_FSET,
FORMAT_SET_NOVALUE_FSET,
FORMAT_SHITLIST_FSET,
FORMAT_SHITLIST_FOOTER_FSET,
FORMAT_SHITLIST_HEADER_FSET,
FORMAT_SIGNOFF_FSET,
FORMAT_SILENCE_FSET,
FORMAT_SMODE_FSET,
FORMAT_STATUS_FSET,
FORMAT_STATUS1_FSET,
FORMAT_STATUS2_FSET,
FORMAT_STATUS3_FSET,
FORMAT_TIMER_FSET,
FORMAT_TOPIC_FSET,
FORMAT_TOPIC_CHANGE_FSET,
FORMAT_TOPIC_CHANGE_HEADER_FSET,
FORMAT_TOPIC_SETBY_FSET,
FORMAT_TOPIC_UNSET_FSET,
FORMAT_TRACE_OPER_FSET,
FORMAT_TRACE_SERVER_FSET,
FORMAT_TRACE_USER_FSET,
FORMAT_USAGE_FSET,
FORMAT_USERLIST_FSET,
FORMAT_USERLIST_FOOTER_FSET,
FORMAT_USERLIST_HEADER_FSET,
FORMAT_USERMODE_FSET,
FORMAT_USERMODE_OTHER_FSET,
FORMAT_USERS_FSET,
FORMAT_USERS_HEADER_FSET,
FORMAT_USERS_SHIT_FSET,
FORMAT_USERS_TITLE_FSET,
FORMAT_USERS_USER_FSET,
FORMAT_VERSION_FSET,
FORMAT_WALL_FSET,
FORMAT_WALLOP_FSET,
FORMAT_WALL_AR_FSET,
FORMAT_WATCH_SIGNOFF_FSET,
FORMAT_WATCH_SIGNON_FSET,
FORMAT_WHO_FSET,
FORMAT_WHOIS_ACTUALLY_FSET,
FORMAT_WHOIS_ADMIN_FSET,
FORMAT_WHOIS_AWAY_FSET,
FORMAT_WHOIS_BOT_FSET,
FORMAT_WHOIS_CALLERID_FSET,
FORMAT_WHOIS_CHANNELS_FSET,
FORMAT_WHOIS_FOOTER_FSET,
FORMAT_WHOIS_FRIEND_FSET,
FORMAT_WHOIS_HEADER_FSET,
FORMAT_WHOIS_HELP_FSET,
FORMAT_WHOIS_IDLE_FSET,
FORMAT_WHOIS_NAME_FSET,
FORMAT_WHOIS_NICK_FSET,
FORMAT_WHOIS_OPER_FSET,
FORMAT_WHOIS_REGISTER_FSET,
FORMAT_WHOIS_SECURE_FSET,
FORMAT_WHOIS_SERVER_FSET,
FORMAT_WHOIS_SERVICE_FSET,
FORMAT_WHOIS_SHIT_FSET,
FORMAT_WHOIS_SIGNON_FSET,
FORMAT_WHOLEFT_FOOTER_FSET,
FORMAT_WHOLEFT_HEADER_FSET,
FORMAT_WHOLEFT_USER_FSET,
FORMAT_WHOWAS_HEADER_FSET,
FORMAT_WHOWAS_NICK_FSET,
FORMAT_WIDELIST_FSET,
FORMAT_WINDOW_SET_FSET,
FORMAT_XTERM_TITLE_FSET,
NUMBER_OF_FSET
};
typedef struct cset_array_struc
{
char *name;
int type;
int offset;
void (*func) (struct cset_array_struc *, CSetList *);
int flag;
} CSetArray;
typedef struct wset_array_struc
{
char *name;
int type;
int offset;
int format_offset;
void (*func) (Window *, char *, int);
int flag;
} WSetArray;
void cset_variable(char *, char *, char *, char *);
int BX_get_cset_int_var(CSetList *, int);
void BX_set_cset_int_var(CSetList *, int, int);
char *BX_get_cset_str_var(CSetList *, int);
void BX_set_cset_str_var(CSetList *, int, const char *);
CSetList *create_csets_for_channel(char *channel);
void remove_csets_for_channel(CSetList *);
char *BX_get_wset_string_var(WSet *, int);
void BX_set_wset_string_var(WSet *, int, char *);
void wset_variable(char *, char *, char *, char *);
WSet *create_wsets_for_window(Window *);
void create_fsets(Window *, int);
void remove_wsets_for_window(Window *);
char *BX_fget_string_var(enum FSET_TYPES);
void BX_fset_string_var(enum FSET_TYPES, char *);
void fset_variable(char *, char *, char *, char *);
char *make_fstring_var(const char *);
char **get_wset_format_var_address(WSet *, int);
char *get_cset(char *, ChannelList *, char *);
void delete_all_ext_fset(void);
CSetList *check_cset_queue(char *, int);
void do_logchannel(unsigned long, ChannelList *, char *, ...);
void check_channel_limit(ChannelList *chan);
void add_numeric_fset(char *name, int remove, char *args, int);
char *find_numeric_fset(int numeric);
#endif /* _CSETS_H_ */

79
include/ctcp.h Normal file
View File

@@ -0,0 +1,79 @@
/*
* ctcp.h: header file for ctcp.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: ctcp.h 40 2008-05-07 11:07:31Z keaston $
*/
#ifndef _CTCP_H_
#define _CTCP_H_
#include "irc.h"
#include "irc_std.h"
#define CTCP_PRIVMSG 0
#define CTCP_NOTICE 1
#define CTCP_SED 0
#define CTCP_UTC 1
#define CTCP_ACTION 2
#define CTCP_DCC 3
#define CTCP_CDCC 4
#define CTCP_CDCC1 5
#define CTCP_CDCC2 6
#define CTCP_VERSION 7
#define CTCP_CLIENTINFO 8
#define CTCP_USERINFO 9
#define CTCP_ERRMSG 10
#define CTCP_FINGER 11
#define CTCP_TIME 12
#define CTCP_PING 13
#define CTCP_ECHO 14
#define CTCP_INVITE 15
#define CTCP_WHOAMI 16
#define CTCP_OP 17
#define CTCP_OPS 18
#define CTCP_IDENT 19
#define CTCP_UNBAN 20
#define CTCP_BOTLINK 21
#define CTCP_UPTIME 22
#define CTCP_CUSTOM 23
#define NUMBER_OF_CTCPS CTCP_CUSTOM
#define CTCP_SPECIAL 0 /* Limited, quiet, noreply, not expanded */
#define CTCP_REPLY 1 /* Sends a reply (not significant) */
#define CTCP_INLINE 2 /* Expands to an inline value */
#define CTCP_NOLIMIT 4 /* Limit of one per privmsg. */
#define CTCP_TELLUSER 8 /* Tell the user about it. */
extern CtcpEntryDll *dll_ctcp;
extern int sed;
extern int in_ctcp_flag;
#define CTCP_DELIM_CHAR '\001'
#define CTCP_DELIM_STR "\001"
#define CTCP_QUOTE_CHAR '\\'
#define CTCP_QUOTE_STR "\\"
#define CTCP_QUOTE_EM "\r\n\001\\"
extern char * ctcp_quote_it (char *, int);
extern char * ctcp_unquote_it (char *, int *);
extern char * do_ctcp (char *, char *, char *);
extern char * do_notice_ctcp (char *, char *, char *);
extern int in_ctcp (void);
extern void send_ctcp (int, char *, int, char *, ...);
extern int get_ctcp_val (char *);
void BX_split_CTCP (char *, char *, char *);
#endif /* _CTCP_H_ */

165
include/dcc.h Normal file
View File

@@ -0,0 +1,165 @@
/*
* dcc.h: Things dealing client to client connections.
*
* Copyright(c) 1998 Colten Edwards
*
*/
#ifndef __dcc_h_
#define __dcc_h_
/*
* these are all used in the bot_link layer. the dcc_printf is used in
* a few other places as well. ie dcc.c
*/
int BX_dcc_printf (int, char *, ...);
void tandout_but (int, char *, ...);
void chanout_but (int, char *, ...);
int handle_tcl_chan (int, char *, char *, char *);
int tand_chan (int, char *);
int tand_zapf (int, char *);
int tand_zapfbroad (int, char *);
int handle_dcc_bot (int, char *);
int tandem_join (int, char *);
int tandem_part (int, char *);
int send_who_to (int, char *, int);
int tand_who (int, char *);
int tand_whom (int, char *);
int tell_who (int, char *);
int send_who (int, char *);
int tell_whom (int, char *);
int send_whom (int, char *);
int tand_priv (int, char *);
int tand_boot (int, char *);
int tand_privmsg (int, char *);
int tand_part (int, char *);
int tand_join (int, char *);
int tand_clink (int, char *);
int tand_command (int, char *);
int cmd_cmsg (int, char *);
int cmd_cboot (int, char *);
int cmd_act (int, char *);
int cmd_help (int, char *);
int cmd_msg (int, char *);
int cmd_say (int, char *);
int cmd_tcl (int, char *);
int cmd_chat (int, char *);
int cmd_quit (int, char *);
int cmd_invite (int, char *);
int cmd_echo (int, char *);
int cmd_boot (int, char *);
int cmd_ops (int, char *);
int cmd_adduser (int, char *);
int cmd_ircii (int, char *);
int cmd_whoami (int, char *);
int send_command (int, char *);
int dcc_ftpcommand (char *, char *);
/*
* these definitions are mostly used by ircII as well
* I expanded the flags to a full 32 bits to allow for future
* expansion.
*/
#define DCC_PACKETID 0xfeab /* used to figure out endianess
* as well as identify the resend
* packet
*/
#define MAX_DCC_BLOCK_SIZE 16384 /*
* this is really arbritrary value.
* we can actually make this a lot
* larger and things will still work
* as expected. The network layer places
* a limit however.
*/
#define DCC_CHAT 0x00000001
#define DCC_FILEOFFER 0x00000002
#define DCC_FILEREAD 0x00000003
#define DCC_RAW_LISTEN 0x00000004
#define DCC_RAW 0x00000005
#define DCC_REFILEOFFER 0x00000006
#define DCC_REFILEREAD 0x00000007
#define DCC_BOTMODE 0x00000008
#define DCC_FTPOPEN 0x00000009
#define DCC_FTPGET 0x0000000a
#define DCC_FTPSEND 0x0000000b
#define DCC_FTPCOMMAND 0x0000000c
#define DCC_TYPES 0x000000ff
#define DCC_WAIT 0x00010000
#define DCC_ACTIVE 0x00020000
#define DCC_OFFER 0x00040000
#define DCC_DELETE 0x00080000
#define DCC_TWOCLIENTS 0x00100000
#ifdef NON_BLOCKING_CONNECTS
#define DCC_CNCT_PEND 0x00200000
#endif
#ifdef HAVE_SSL
#define DCC_SSL 0x04000000
#endif
#define DCC_QUEUE 0x00400000
#define DCC_TDCC 0x00800000
#define DCC_BOTCHAT 0x01000000
#define DCC_ECHO 0x02000000
#define DCC_STATES 0xffffff00
int check_dcc_list (char *);
int dcc_exempt_save (FILE *);
void BX_dcc_filesend(char *, char *);
void BX_dcc_resend(char *, char *);
void dcc_stats(char *, char *);
void dcc_chat(char *, char *);
void dcc_ftpopen(char *, char *);
void dcc_glist(char *, char *);
void dcc_chatbot(char *, char *);
void dcc_resume(char *, char *);
void dcc_rename(char *, char *);
int BX_get_active_count(void);
int dcc_ftpcommand(char *, char *);
void process_dcc(char *);
int dcc_activechat(char *); /* identify all active chat dcc's */
int dcc_activebot(char *); /* identify all active bot's */
int dcc_activeraw(char *); /* identify all active raw connects */
void dcc_chat_transmit(char *, char *, char *, char *, int);
void dcc_bot_transmit(char *, char *, char *);
void dcc_raw_transmit(char *, char *, char *);
void register_dcc_type(char *, char *, char *, char *, char *, char *, char *, char *, void (*func)(int));
void dcc_reject(char *, char *, char *);
char *dcc_raw_connect(char *, unsigned short);
char *dcc_raw_listen(int port);
void close_all_dcc(void);
void dcc_sendfrom_queue(void);
void dcc_check_idle(void);
int check_dcc_socket(int);
char *get_dcc_info(SocketList *, DCC_int *, int);
void init_dcc_table(void);
int BX_remove_all_dcc_binds(char *);
int BX_remove_dcc_bind(char *, int);
int BX_add_dcc_bind(char *, char *, void *, void *, void *, void *, void *);
SocketList *BX_find_dcc(char *, char *, char *, int, int, int, int);
void BX_erase_dcc_info(int, int, char *, ...);
DCC_int *BX_dcc_create(char *, char *, char *, unsigned long, int, int, unsigned long, void (*func)(int));
int close_dcc_number(int);
char * equal_nickname (const char *);
#define DCC_STRUCT_TYPE 0xdcc0dcc0
#endif /* __dcc_h_ */

43
include/debug.h Normal file
View File

@@ -0,0 +1,43 @@
/*
* debug.h -- the runtime debug settings. Can also be done on command line.
*/
#ifndef __X_DEBUG_H__
#define __X_DEBUG_H__
extern unsigned long x_debug;
extern unsigned long internal_debug;
extern unsigned long alias_debug;
extern unsigned int debug_count;
extern int in_debug_yell;
BUILT_IN_COMMAND(xdebugcmd);
void debugyell (const char *, ...);
void debug_alias (char *, int);
void debug_hook (char *, int);
#define DEBUG_LOCAL_VARS 1 << 0
#define DEBUG_ALIAS 1 << 1
#define DEBUG_CTCPS 1 << 2
#define DEBUG_DCC_SEARCH 1 << 3
#define DEBUG_OUTBOUND 1 << 4
#define DEBUG_INBOUND 1 << 5
#define DEBUG_DCC_XMIT 1 << 6
#define DEBUG_WAITS 1 << 7
#define DEBUG_MEMORY 1 << 8
#define DEBUG_SERVER_CONNECT 1 << 9
#define DEBUG_CRASH 1 << 10
#define DEBUG_COLOR 1 << 11
#define DEBUG_NOTIFY 1 << 12
#define DEBUG_REGEX 1 << 13
#define DEBUG_REGEX_DEBUG 1 << 14
#define DEBUG_BROKEN_CLOCK 1 << 15
#define DEBUG_UNKNOWN 1 << 16
#define DEBUG_DEBUGGER 1 << 17
#define DEBUG_NEW_MATH 1 << 18
#define DEBUG_NEW_MATH_DEBUG 1 << 19
#define DEBUG_AUTOKEY 1 << 20
#define DEBUG_STRUCTURES 1 << 21
#define DEBUG_ALL (unsigned long)0xffffffff
#endif

483
include/defs.h.in Normal file
View File

@@ -0,0 +1,483 @@
/* include/defs.h.in. Generated from configure.in by autoheader. */
/* Define this if bcopy is declared in string.h. */
#undef BCOPY_DECLARED
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
#undef CRAY_STACKSEG_END
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
/* Default BitchX help file. */
#undef DEFAULT_BITCHX_HELP_FILE
/* Default BitchX ircname file. */
#undef DEFAULT_BITCHX_IRCNAME_FILE
/* Default BitchX kick file. */
#undef DEFAULT_BITCHX_KICK_FILE
/* Default BitchX quit file. */
#undef DEFAULT_BITCHX_QUIT_FILE
/* Default CToolZ directory. */
#undef DEFAULT_CTOOLZ_DIR
/* Default MsgLog file. */
#undef DEFAULT_MSGLOGFILE
/* Default BitchX script file. */
#undef DEFAULT_SCRIPT_HELP_FILE
/* Define a list of default servers here. */
#undef DEFAULT_SERVER
/* Define this if errno is declared in errno.h. */
#undef ERRNO_DECLARED
/* Define this if getpass is declared in unistd.h. */
#undef GETPASS_DECLARED
/* Define this if getpgid is declared in unistd.h. */
#undef GETPGID_DECLARED
/* Define to 1 if the `getpgrp' function requires zero arguments. */
#undef GETPGRP_VOID
/* Define this if you want GTK support. */
#undef GTK
/* Define this if you want GUI support (PM or GTK or Win32). */
#undef GUI
/* Define to 1 if you have `alloca', as a function or macro. */
#undef HAVE_ALLOCA
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
#undef HAVE_ALLOCA_H
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#undef HAVE_ARPA_NAMESER_H
/* Define this if you have a crypt implementation in -lcrypt */
#undef HAVE_CRYPT
/* Define to 1 if you have the <curses.h> header file. */
#undef HAVE_CURSES_H
/* Define to 1 if you have the declaration of `strsignal', and to 0 if you
don't. */
#undef HAVE_DECL_STRSIGNAL
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL_SYS_SIGLIST
/* Define to 1 if you have the declaration of `_sys_siglist', and to 0 if you
don't. */
#undef HAVE_DECL__SYS_SIGLIST
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define this if you want loadable module support. */
#undef HAVE_DLLIB
/* Define to 1 if you have the `fchdir' function. */
#undef HAVE_FCHDIR
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the `fpathconf' function. */
#undef HAVE_FPATHCONF
/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
/* Define to 1 if you have the `getlogin' function. */
#undef HAVE_GETLOGIN
/* Define to 1 if you have the `getpass' function. */
#undef HAVE_GETPASS
/* Define to 1 if you have the `getpgid' function. */
#undef HAVE_GETPGID
/* Define to 1 if you have the `getpwent' function. */
#undef HAVE_GETPWENT
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define this if inet_aton is in the system. */
#undef HAVE_INET_ATON
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `killpg' function. */
#undef HAVE_KILLPG
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#undef HAVE_LIBCRYPTO
/* Define to 1 if you have the Windows iphlpapi library */
#undef HAVE_LIBIPHLPAPI
/* Define to 1 if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL
/* Define to 1 if you have the <linux/soundcard.h> header file. */
#undef HAVE_LINUX_SOUNDCARD_H
/* Define to 1 if you have the <machine/soundcard.h> header file. */
#undef HAVE_MACHINE_SOUNDCARD_H
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define to 1 if you have the <ncurses.h> header file. */
#undef HAVE_NCURSES_H
/* Define to 1 if you have the <ncurses/termcap.h> header file. */
#undef HAVE_NCURSES_TERMCAP_H
/* Define to 1 if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define this if your ZVT is newer than 1.0.10. */
#undef HAVE_NEW_ZVT
/* Define this if you want QMAIL support. */
#undef HAVE_QMAIL
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define this if you have the resolv library. */
#undef HAVE_RESOLV
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
/* Define to 1 if you have the `scandir' function. */
#undef HAVE_SCANDIR
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID
/* Define to 1 if you have the `setvbuf' function. */
#undef HAVE_SETVBUF
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define this if the system has SSL support. */
#undef HAVE_SSL
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `stpcpy' function. */
#undef HAVE_STPCPY
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the `strftime' function. */
#undef HAVE_STRFTIME
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strlcat' function. */
#undef HAVE_STRLCAT
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
/* Define this if sun_len is declared in sys/un.h. */
#undef HAVE_SUN_LEN
/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF
/* Define to 1 if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/fcntl.h> header file. */
#undef HAVE_SYS_FCNTL_H
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define to 1 if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H
/* Define if you have the <tcl.h> header file. */
#undef HAVE_TCL_H
/* Define to 1 if you have the <termcap.h> header file. */
#undef HAVE_TERMCAP_H
/* Define this if you have terminfo support. */
#undef HAVE_TERMINFO
/* Define this if you have the tparm function in an included lib. */
#undef HAVE_TPARM
/* Define this if you have the tputs function in an included lib. */
#undef HAVE_TPUTS
/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vsnprintf' function. */
#undef HAVE_VSNPRINTF
/* Define this if you want IPV6 support. */
#undef IPV6
/* Define this if killpg is declared in signal.h. */
#undef KILLPG_DECLARED
/* Define this if your non-blocking type is bsd. */
#undef NBLOCK_BSD
/* Define this if your non-blocking type is posix. */
#undef NBLOCK_POSIX
/* Define this if your non-blocking type is sysv. */
#undef NBLOCK_SYSV
/*
* Are we doing non-blocking connects? Note: SOCKS support precludes us from
* using this feature.
*/
#if (defined(NBLOCK_POSIX) || defined(NBLOCK_BSD) || defined(NBLOCK_SYSV)) && !defined(SOCKS)
#define NON_BLOCKING_CONNECTS
#endif
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
/* Define to 1 if the `setpgrp' function takes no argument. */
#undef SETPGRP_VOID
/* Define to 1 if the `setvbuf' function takes the buffering type as its
second argument and the buffer pointer as the third, as on System V before
release 3. */
#undef SETVBUF_REVERSED
/* The size of a `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
/* The size of a `unsigned long', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG
/* Define this if you want SOCKS support. */
#undef SOCKS
/* Define this is you want sound support via ESD. */
#undef SOUND
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define this if stpcpy is declared in string.h. */
#undef STPCPY_DECLARED
/* Define this if struct_linger is declared in sys/socket.h. */
#undef STRUCT_LINGER_DECLARED
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define this if tparm is declared in termcap.h. */
#undef TPARM_DECLARED
/* Define this if tputs is declared in termcap.h. */
#undef TPUTS_DECLARED
/* Define your maildir here. */
#undef UNIX_MAIL
/* Define this if you are unsure what is 32 bits. */
#undef UNKNOWN_32INT
/* Define this if an unsigned long is 32 bits. */
#undef UNSIGNED_INT32
/* Define this if an unsigned int is 32 bits. */
#undef UNSIGNED_LONG32
/* Define this if you want GNOME support. */
#undef USE_GNOME
/* Define this if you want imlib support. */
#undef USE_IMLIB
/* Define this if you want ZVT support. */
#undef USE_ZVT
/* Define long BitchX version here. */
#undef VERSION
/* Define BitchX version number here. */
#undef VERSION_NUMBER
/* Define this if you want CD-ROM support. */
#undef WANT_CD
/*
* Define this if you have shlib support and want plugin support in BitchX
* Note: Not all systems support this.
*/
#ifdef HAVE_DLLIB
#define WANT_DLL
#endif
/* Define this if you want Tcl support. */
#undef WANT_TCL
/* WIN32 is true if we are building a GUI client under Windows NT */
#if defined(GUI) && defined(WINNT)
#define WIN32 1
#endif
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
/* Define short BitchX version here. */
#undef _VERSION_
/* Define this is you want OS/2 PM support. */
#undef __EMXPM__
/* Define like PROTOTYPES; this can be used by system headers. */
#undef __PROTOTYPES
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
#undef mode_t
/* Define to `long' if <sys/types.h> does not define. */
#undef off_t
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t

53
include/dlfcn.h Normal file
View File

@@ -0,0 +1,53 @@
/*
* dlfcn.h --
*
* This file provides a replacement for the header file "dlfcn.h"
* on systems where dlfcn.h is missing. It's primary use is for
* AIX, where Tcl emulates the dl library.
*
* This file is subject to the following copyright notice, which is
* different from the notice used elsewhere in Tcl but rougly
* equivalent in meaning.
*
* Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH
* Not derived from licensed software.
*
* Permission is granted to freely use, copy, modify, and redistribute
* this software, provided that the author is not construed to be liable
* for any results of using the software, alterations are clearly marked
* as such, and this notice is not modified.
*
* SCCS: @(#) dlfcn.h 1.4 96/09/17 09:05:59
*/
/*
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
* 30159 Hannover, Germany
*/
#ifndef __dlfcn_h__
#define __dlfcn_h__
/*
* Mode flags for the dlopen routine.
*/
#define RTLD_LAZY 1 /* lazy function call binding */
#define RTLD_NOW 2 /* immediate function call binding */
#define RTLD_GLOBAL 0x100 /* allow symbols to be global */
/*
* To be able to intialize, a library may provide a dl_info structure
* that contains functions to be called to initialize and terminate.
*/
struct dl_info {
void (*init) (void);
void (*fini) (void);
};
void *dlopen (const char *path, int mode);
void *dlsym (void *handle, const char *symbol);
char *dlerror (void);
int dlclose (void *handle);
#endif /* __dlfcn_h__ */

26
include/encrypt.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* crypt.h: header for crypt.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: encrypt.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __CRYPT_H_
#define __CRYPT_H_
char *crypt_msg (char *, char *);
char *decrypt_msg (char *, char *);
void encrypt_cmd (char *, char *, char *, char *);
char *is_crypted (char *);
void BX_my_decrypt (char *, int, char *);
void BX_my_encrypt (char *, int, char *);
#define CRYPT_HEADER ""
#define CRYPT_HEADER_LEN 5
#endif /* __crypt_h_ */

25
include/exec.h Normal file
View File

@@ -0,0 +1,25 @@
/*
* exec.h: header for exec.c
*
* Copyright 1990 Michael Sandrof
* Copyright 1997 EPIC Software Labs
* See the Copyright file for license information
*/
#ifndef __exec_h__
#define __exec_h__
void execcmd (char *, char *, char *, char *);
void do_processes (fd_set *);
int get_child_exit (pid_t);
void clean_up_processes (void);
int text_to_process (int, const char *, int);
void exec_server_delete (int);
void add_process_wait (int, const char *);
int get_process_index (char **); /* XXXX */
int is_valid_process (const char *);
int process_is_running (char *);
int logical_to_index (const char *logical);
void kill_process (int, int);
#endif /* _EXEC_H_ */

27
include/files.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* files.h -- header file for files.c
*
* Direct file manipulation for irc? Unheard of!
* (C) 1995 Jeremy Nelson
* See the COPYRIGHT file for copyright information
*
*/
#ifndef FILES_H
#define FILES_H
#include "irc_std.h"
extern int open_file_for_read (char *);
extern int open_file_for_write (char *);
extern int file_write (int, char *);
extern int file_writeb (int, char *);
extern char * file_read (int);
extern char * file_readb (int, int);
extern int file_eof (int);
extern int file_close (int);
extern int open_file_for_bwrite (char *);
extern int file_copy (int, int);
extern int file_valid (int);
#endif

33
include/flood.h Normal file
View File

@@ -0,0 +1,33 @@
/*
* flood.h: header file for flood.c
*
* @(#)$Id: flood.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __flood_h_
#define __flood_h_
int BX_check_flooding (char *, int, char *, char *);
int BX_is_other_flood (ChannelList *, NickList *, int, int *);
int BX_flood_prot (char *, char *, char *, int, int, char *);
void clean_flood_list (void);
#define MSG_FLOOD 0x0001
#define PUBLIC_FLOOD 0x0002
#define NOTICE_FLOOD 0x0004
#define WALL_FLOOD 0x0008
#define WALLOP_FLOOD 0x0010
#define CTCP_FLOOD 0x0020
#define INVITE_FLOOD 0x0040
#define CDCC_FLOOD 0x0080
#define CTCP_ACTION_FLOOD 0x0100
#define NICK_FLOOD 0x0200
#define DEOP_FLOOD 0x0400
#define KICK_FLOOD 0x0800
#define JOIN_FLOOD 0x1000
#include "hash.h"
#define FLOOD_HASHSIZE 31
extern HashEntry no_flood_list[FLOOD_HASHSIZE];
#endif /* __flood_h_ */

35
include/funny.h Normal file
View File

@@ -0,0 +1,35 @@
/*
* funny.h: header for funny.c
*
* written by michael sandrof
*
* copyright(c) 1990
*
* see the copyright file, or do a help ircii copyright
*
* @(#)$Id: funny.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __funny_h_
#define __funny_h_
#define FUNNY_PUBLIC 1
#define FUNNY_PRIVATE 2
#define FUNNY_TOPIC 4
#define FUNNY_WIDE 8
#define FUNNY_USERS 16
#define FUNNY_NAME 32
void set_funny_flags (int, int, int);
void funny_set_ignore_mode (void);
int funny_is_ignore_channel (void);
void funny_set_ignore_channel (char *);
void funny_match (char *);
void reinstate_user_modes (void);
void funny_print_widelist (void);
void funny_list (char *, char **);
void funny_mode (char *, char **);
void funny_namreply (char *, char **);
void update_user_mode (char *);
#endif /* __funny_h_ */

54
include/gtkbitchx.h Normal file
View File

@@ -0,0 +1,54 @@
#ifndef _GTK_BITCHX_
#define _GTK_BITCHX_
#if defined(GUI)
#ifdef __linux__
/* For glibc linux systems. */
#ifndef _REENTRANT
#define _REENTRANT
#endif
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#endif
#define _P __P
#endif
/* So X11/X.h won't get included */
#define X_H
void menuitemhandler(gpointer *data);
GtkWidget *newsubmenu(MenuStruct *menutoadd);
int gtk_getx(void);
int gtk_gety(void);
void newmenubar(Screen *menuscreen, MenuStruct *menutoadd);
GtkWidget *newsubmenu(MenuStruct *menutoadd);
void gtk_new_window(Screen *new, Window *win);
void gtk_paste (GtkWidget *widget, GtkSelectionData *selection_data,
gpointer data);
void selection_handle (GtkWidget *widget,
GtkSelectionData *selection_data,
guint info, guint seltime);
int gtkprintf(char *format, ...);
void size_allocate (GtkWidget *widget, GtkWindow *window);
void gtk_about_box(char *about_text);
void gtk_label_set_color(GtkWidget *label, int color);
void gtk_tab_move(int page, int pos);
void gtk_main_paste(int refnum);
int notebook_page_by_refnum(int refnum);
void make_new_notebook(void);
void tab_to_window(Screen *tmp);
void window_to_tab(Screen *tmp);
char *gtk_windowlabel(Screen *tmp);
void gtk_windowicon(GtkWidget *window);
void make_tip(GtkWidget *widget, char *tip);
#endif
void gui_mutex_lock(void);
void gui_mutex_unlock(void);
#endif

119
include/gui.h Normal file
View File

@@ -0,0 +1,119 @@
#ifndef _GUI_H_
#define _GUI_H_
#ifdef GUI
#define GUISUBMENU 1
#define GUIMENUITEM (1 << 1)
#define GUIIAMENUITEM (1 << 2)
#define GUIDEFMENUITEM (1 << 3)
#define GUIBRKMENUITEM (1 << 4)
#define GUISEPARATOR (1 << 5)
#define GUISHARED (1 << 6)
#define GUIBRKSUBMENU (1 << 7)
#define GUICHECKEDMENUITEM (1 << 8)
#define GUINDMENUITEM (1 << 9)
#define GUICHECKMENUITEM (1 << 10)
#ifdef __EMXPM__
#include "PMbitchx.h"
#elif defined(GTK)
#include "gtkbitchx.h"
#elif defined(WIN32)
#include "winbitchx.h"
#endif
#define EVNONE 0
#define EVMENU 1
#define EVFOCUS 2
#define EVREFRESH 3
#define EVSTRACK 4
#define EVSUP 5
#define EVSDOWN 6
#define EVSUPPG 7
#define EVSDOWNPG 8
#define EVKEY 9
#define EVFILE 10
#define EVTITLE 11
#define EVPASTE 12
#define EVDELETE 13
#define COLOR_INACTIVE 0
#define COLOR_ACTIVE 1
#define COLOR_HIGHLIGHT 2
#include "struct.h"
/* These are all the functions that each GUI module must provide for
a clean port to other GUI OSes.
gui_init() - main initialization routine.
*/
void gui_init(void);
void gui_clreol(void);
void gui_gotoxy(int col, int row);
void gui_clrscr(void);
void gui_left(int num);
void gui_right(int num);
void gui_scroll(int top, int bot, int n);
void gui_flush(void);
void gui_puts(unsigned char *buffer);
void gui_new_window(Screen *new, Window *win);
void gui_kill_window(Screen *killscreen);
void gui_settitle(char *titletext, Screen *screen);
void gui_font_dialog(Screen *screen);
void gui_file_dialog(char *type, char *path, char *title, char *ok, char *apply, char *code, char *szButton);
void gui_properties_notebook(void);
void gui_msgbox(void);
void gui_popupmenu(char *menuname);
void gui_paste(char *args);
void gui_setfocus(Screen *screen);
void gui_scrollerchanged(Screen *screen, int position);
void gui_query_window_info(Screen *screen, char *fontinfo, int *x, int *y, int *cx, int *cy);
void gui_play_sound(char *filename);
void gui_get_sound_error(int errnum, char *errstring);
void gui_menu(Screen *screen, char *addmenu);
void gui_exit(void);
void gui_screen(Screen *new);
void gui_resize(Screen *new);
int gui_send_mci_string(char *mcistring, char *retstring);
int gui_isset(Screen *screen, fd_set *rd, int what);
int gui_putc(int c);
int gui_read(Screen *screen, char *buffer, int maxbufsize);
int gui_screen_width(void);
int gui_screen_height(void);
void gui_setwindowpos(Screen *screen, int x, int y, int cx, int cy, int top, int bottom, int min, int max, int restore, int activate, int size, int position);
void gui_font_init(void);
void gui_font_set(char *font, Screen *screen);
void BX_gui_mutex_lock(void);
void BX_gui_mutex_unlock(void);
int gui_setmenuitem(char *menuname, int refnum, char *what, char *param);
void gui_remove_menurefs(char *menu);
void gui_mdi(Window *, char *, int);
void gui_update_nicklist(char *);
void gui_nicklist_width(int, Screen *);
void gui_startup(int argc, char *argv[]);
void gui_about_box(char *about_text);
void gui_activity(int color);
void gui_setfileinfo(char *filename, char *nick, int server);
void gui_setfd(fd_set *rd);
/* These are just miscellaneous GUI function declarations */
MenuStruct *findmenu(char *menuname);
void sendevent(unsigned int event, unsigned int window);
/* A fix for different systems declaring tputs differently */
#ifdef GTK
#ifdef __sun__
int gtkputs (const char *str, int n, int (*blah)(int));
#else
int gtkputs __P((const char *str, int n, int (*blah)(int)));
#endif
#define tputs gtkputs
#endif
#define current_screen last_input_screen
#define INPUT_BUFFER current_screen->input_buffer
#define ADD_TO_INPUT(x) strmcat(INPUT_BUFFER, (x), INPUT_BUFFER_SIZE);
#endif
#endif

36
include/hash.h Normal file
View File

@@ -0,0 +1,36 @@
/*
* hash.h: header file for hash.c
*
* Written by Scott H Kilau
*
* CopyRight(c) 1997
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: hash.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef _HASH_H_
#define _HASH_H_
#define NICKLIST_HASHSIZE 79
#define WHOWASLIST_HASHSIZE 271
#ifndef REMOVE_FROM_LIST
# define REMOVE_FROM_LIST 1
#endif
#include "struct.h"
/* hashentry: structure for all hash lists we make.
* quite generic, but powerful.
*/
typedef struct hashentry
{
void *list; /* our linked list, generic void * */
unsigned short hits; /* how many hits this spot has gotten */
unsigned short links; /* how many links we have at this spot */
} HashEntry;
#endif

67
include/hash2.h Normal file
View File

@@ -0,0 +1,67 @@
/*
* hash2.h: function header file for hash.c
*
* Written by Scott H Kilau
*
* CopyRight(c) 1997
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: hash2.h 52 2008-06-14 06:45:05Z keaston $
*/
#ifndef _HASH2_H_
#define _HASH2_H_
#include "struct.h"
#include "whowas.h"
#include "hash.h"
/* Generic List type hash list */
void BX_add_name_to_genericlist (char *, HashEntry *, unsigned int);
List *BX_find_name_in_genericlist (char *, HashEntry *, unsigned int, int);
List *BX_next_namelist(HashEntry *, List *, unsigned int);
void BX_add_nicklist_to_channellist(NickList *, ChannelList *);
void BX_add_whowas_userhost_channel (WhowasList *, WhowasWrapList *);
WhowasList *BX_find_userhost_channel (char *, char *, int, WhowasWrapList *);
int BX_remove_oldest_whowas_hashlist (WhowasWrapList *, time_t, int);
WhowasList *BX_next_userhost(WhowasWrapList *, WhowasList *);
NickList *BX_find_nicklist_in_channellist(char *, ChannelList *, int);
NickList *BX_next_nicklist(ChannelList *, NickList *);
void clear_nicklist_hashtable(ChannelList *);
void show_nicklist_hashtable(ChannelList *);
void show_whowas_hashtable(WhowasWrapList *cptr, char *);
int show_wholeft_hashtable(WhowasWrapList *cptr, time_t ltime, int *total, int *hook, char *);
/* Determines if the Nick matches the nick!user@host mask given. */
int nick_match(NickList *nick, char *mask);
/* Added to sort a hash'd nicklist and them remove the sorted list */
NickList *BX_sorted_nicklist(ChannelList *, int);
void BX_clear_sorted_nicklist(NickList **);
/* Warning: These numeric values can be taken directly from scripts via
* the $channel() function - so BEWARE if you change them! */
#define NICKSORT_NORMAL 0
#define NICKSORT_NONE 1
#define NICKSORT_NICK 2
#define NICKSORT_HOST 3
#define NICKSORT_TIME 4
#define NICKSORT_IP 5
#define NICKSORT_STAT 6
Flooding *BX_find_name_in_floodlist(char *, char *, HashEntry *, unsigned int, int);
Flooding *BX_add_name_to_floodlist(char *, char *, char *, HashEntry *, unsigned int);
unsigned long hash_nickname(char *, unsigned int);
#endif

11
include/hebrew.h Normal file
View File

@@ -0,0 +1,11 @@
/*
* hebrew.h
* by crisk
*
* for hebrew_process in hebrew.c
*
*/
extern unsigned char *hebrew_process(unsigned char *str);

16
include/help.h Normal file
View File

@@ -0,0 +1,16 @@
/*
* help.h: header for help.c
*
* copyright(c) 1994 matthew green
*
* See the copyright file, or do a help ircii copyright
*
* @(#)$Id: help.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __help_h
# define __help_h
void help (char *, char *, char *, char *);
#endif /* __help_h */

26
include/history.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* history.h: header for history.c
*
* Copyright 1990 Michael Sandrof
* Copyright 1997 EPIC Software Labs
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: history.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __history_h__
#define __history_h__
BUILT_IN_COMMAND(history);
void set_history_size (Window *, char *, int);
void add_to_history (char *);
char *get_from_history (int);
void get_history (int);
char *do_history (char *, char *);
void shove_to_history (char, char *);
/* used by get_history */
#define NEXT 0
#define PREV 1
#endif /* _HISTORY_H_ */

25
include/hold.h Normal file
View File

@@ -0,0 +1,25 @@
/*
* hold.h: header for hold.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: hold.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __hold_h_
#define __hold_h_
void remove_from_hold_list (Window *);
void add_to_hold_list (Window *, char *, int);
void hold_mode (Window *, int, int);
int hold_output (Window *);
char *hold_queue (Window *);
void reset_hold (Window *);
int hold_queue_logged (Window *);
void toggle_stop_screen (char, char *);
#endif /* __hold_h_ */

184
include/hook.h Normal file
View File

@@ -0,0 +1,184 @@
/*
* hook.h.proto: header for hook.c
*
* Generated from hook.h.proto automatically by the Makefile
*
* @(#)$Id: hook.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __hook_h_
# define __hook_h_
enum HOOK_TYPES {
ACTION_LIST,
BANS_LIST,
BANS_FOOTER_LIST,
BANS_HEADER_LIST,
CDCC_NOTE_LIST,
CDCC_PACK_LIST,
CDCC_POSTPACK_LIST,
CDCC_PREPACK_LIST,
CDCC_QUEUE_LIST,
CDCC_QUEUEH_LIST,
CDCC_SEND_NICK_LIST,
CDCC_STATS_LIST,
CHANOP_LIST,
CHANNEL_NICK_LIST,
CHANNEL_SIGNOFF_LIST,
CHANNEL_STATS_LIST,
CHANNEL_SWITCH_LIST,
CHANNEL_SYNCH_LIST,
CLONE_LIST,
CONNECT_LIST,
CTCP_LIST,
CTCP_REPLY_LIST,
DCC_CHAT_LIST,
DCC_CONNECT_LIST,
DCC_ERROR_LIST,
DCC_HEADER_LIST,
DCC_LOST_LIST,
DCC_OFFER_LIST,
DCC_POST_LIST,
DCC_RAW_LIST,
DCC_REQUEST_LIST,
DCC_STAT_LIST,
DCC_STATF_LIST,
DCC_STATF1_LIST,
DCC_TRANSFER_STAT_LIST,
DCC_UPDATE_LIST,
DEBUG_LIST,
DESYNC_MESSAGE_LIST,
DISCONNECT_LIST,
EBANS_LIST,
EBANS_FOOTER_LIST,
EBANS_HEADER_LIST,
ENCRYPTED_NOTICE_LIST,
ENCRYPTED_PRIVMSG_LIST,
EXEC_LIST,
EXEC_ERRORS_LIST,
EXEC_EXIT_LIST,
EXEC_PROMPT_LIST,
EXIT_LIST,
FLOOD_LIST,
FTP_LIST,
HELP_LIST,
HELPSUBJECT_LIST,
HELPTOPIC_LIST,
HOOK_LIST,
IDLE_LIST,
INPUT_LIST,
INVITE_LIST,
JOIN_LIST,
JOIN_ME_LIST,
KICK_LIST,
LEAVE_LIST,
LEAVE_ME_LIST,
LIST_LIST,
LLOOK_ADDED_LIST,
LLOOK_JOIN_LIST,
LLOOK_SPLIT_LIST,
MAIL_LIST,
MODE_LIST,
MODE_STRIPPED_LIST,
MODULE_LIST,
MSG_LIST,
MSG_GROUP_LIST,
MSGLOG_LIST,
NAMES_LIST,
NETSPLIT_LIST,
NICK_COMP_LIST,
NICKNAME_LIST,
NOTE_LIST,
NOTICE_LIST,
NOTIFY_LIST,
NOTIFY_HEADER_LIST,
NOTIFY_SIGNOFF_LIST,
NOTIFY_SIGNON_LIST,
NSLOOKUP_LIST,
ODD_SERVER_STUFF_LIST,
PASTE_LIST,
PUBLIC_LIST,
PUBLIC_AR_LIST,
PUBLIC_MSG_LIST,
PUBLIC_NOTICE_LIST,
PUBLIC_OTHER_LIST,
PUBLIC_OTHER_AR_LIST,
RAW_IRC_LIST,
REDIRECT_LIST,
REPLY_AR_LIST,
SAVEFILE_LIST,
SAVEFILEPOST_LIST,
SAVEFILEPRE_LIST,
SEND_ACTION_LIST,
SEND_CTCP_LIST,
SEND_DCC_CHAT_LIST,
SEND_MSG_LIST,
SEND_NOTICE_LIST,
SEND_PUBLIC_LIST,
SEND_TO_SERVER_LIST,
SERVER_NOTICE_FAKES_LIST,
SERVER_NOTICE_FAKES_MYCHANNEL_LIST,
SERVER_NOTICE_FOREIGN_KILL_LIST,
SERVER_NOTICE_KILL_LIST,
SERVER_NOTICE_LIST,
SERVER_NOTICE_LOCAL_KILL_LIST,
SERVER_NOTICE_SERVER_KILL_LIST,
SET_LIST,
SHITLIST_LIST,
SHITLIST_FOOTER_LIST,
SHITLIST_HEADER_LIST,
SHOWIDLE_FOOTER_LIST,
SHOWIDLE_HEADER_LIST,
SHOWIDLE_LIST,
SIGNOFF_LIST,
SILENCE_LIST,
SOCKET_LIST,
SOCKET_NOTIFY_LIST,
STAT_LIST,
STAT_FOOTER_LIST,
STAT_HEADER_LIST,
STATUS_UPDATE_LIST,
SWITCH_CHANNELS_LIST,
TIMER_LIST,
TIMER_HOUR_LIST,
TOPIC_LIST,
URLGRAB_LIST,
USAGE_LIST,
USERLIST_LIST,
USERLIST_FOOTER_LIST,
USERLIST_HEADER_LIST,
USERS_LIST,
USERS_FOOTER_LIST,
USERS_HEADER_LIST,
USERS_IP_LIST,
USERS_SERVER_LIST,
USERS_SERVER_HEADER_LIST,
WALL_LIST,
WALLOP_LIST,
WATCH_LIST,
WHO_LIST,
WHOLEFT_LIST,
WHOLEFT_FOOTER_LIST,
WHOLEFT_HEADER_LIST,
WIDELIST_LIST,
WINDOW_LIST,
WINDOW_CREATE_LIST,
WINDOW_FOCUS_LIST,
WINDOW_KILL_LIST,
WINDOW_SWAP_LIST,
YELL_LIST,
ZZZ_ALWAYS_COMES_LAST_IN_THIS_LIST
};
#define NUMBER_OF_LISTS ZZZ_ALWAYS_COMES_LAST_IN_THIS_LIST
int BX_do_hook (int, char *, ...);
void flush_on_hooks (void);
void unload_on_hooks (char *);
BUILT_IN_COMMAND(shookcmd);
BUILT_IN_COMMAND(oncmd);
void save_hooks (FILE *, int);
void do_stack_on (int, char *);
extern HookFunc hook_functions[];
#endif /* __hook_h_ */

26
include/if.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* if.h: header for if.c
*
* copyright(c) 1994 matthew green
*
* See the copyright file, or do a help ircii copyright
*
* @(#)$Id: if.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __if_h
# define __if_h
void ifcmd (char *, char *, char *, char *);
void whilecmd (char *, char *, char *, char *);
void foreach_handler (char *, char *, char *);
void foreach (char *, char *, char *, char *);
void fe (char *, char *, char *, char *);
void forcmd (char *, char *, char *, char *);
void fec (char *, char *, char *, char *);
void docmd (char *, char *, char *, char *);
void switchcmd (char *, char *, char *, char *);
extern char * next_expr (char **, char);
extern char * next_expr_failok (char **, char);
#endif /* __if_h */

68
include/ignore.h Normal file
View File

@@ -0,0 +1,68 @@
/*
* ignore.h: header for ignore.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*/
#ifndef __ignore_h_
#define __ignore_h_
/* Type of ignored nicks */
#define IGNORE_MSGS 0x0001
#define IGNORE_PUBLIC 0x0002
#define IGNORE_WALLS 0x0004
#define IGNORE_WALLOPS 0x0008
#define IGNORE_INVITES 0x0010
#define IGNORE_NOTICES 0x0020
#define IGNORE_NOTES 0x0040
#define IGNORE_CTCPS 0x0080
#define IGNORE_CDCC 0x0100
#define IGNORE_KICKS 0x0200
#define IGNORE_MODES 0x0400
#define IGNORE_SMODES 0x0800
#define IGNORE_JOINS 0x1000
#define IGNORE_TOPICS 0x2000
#define IGNORE_QUITS 0x4000
#define IGNORE_PARTS 0x8000
#define IGNORE_NICKS 0x10000
#define IGNORE_PONGS 0x20000
#define IGNORE_SPLITS 0x40000
#define IGNORE_CRAP 0x80000
#define IGNORE_ALL (IGNORE_MSGS | IGNORE_PUBLIC | IGNORE_WALLS | \
IGNORE_WALLOPS | IGNORE_INVITES | IGNORE_NOTICES | \
IGNORE_NOTES | IGNORE_CTCPS | IGNORE_CRAP | \
IGNORE_CDCC | IGNORE_KICKS | IGNORE_MODES | \
IGNORE_SMODES | IGNORE_JOINS | IGNORE_TOPICS | \
IGNORE_QUITS | IGNORE_PARTS | IGNORE_NICKS | \
IGNORE_PONGS | IGNORE_SPLITS)
#define IGNORED 1
#define DONT_IGNORE 2
#define HIGHLIGHTED -1
#define CHANNEL_GREP -2
extern int ignore_usernames;
extern char *highlight_char;
extern Ignore *ignored_nicks;
int is_ignored (char *, long);
int check_ignore (char *, char *, char *, long, char *);
void ignore (char *, char *, char *, char *);
void tignore (char *, char *, char *, char *);
void ignore_nickname (char *, long, int);
long ignore_type (char *, int);
int check_is_ignored(char *);
char *get_ignores_by_pattern (char *patterns, int covered);
int get_type_by_desc (char *type, int *do_mask, int *dont_mask);
char *get_ignore_types (Ignore *tmp);
char *get_ignore_types_by_pattern (char *pattern);
char *get_ignore_patterns_by_type (char *ctype);
#endif /* __ignore_h_ */

180
include/input.h Normal file
View File

@@ -0,0 +1,180 @@
/*
* input.h: header for input.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: input.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __input_h_
#define __input_h_
char input_pause (char *);
void BX_set_input (char *);
void BX_set_input_prompt (Window *, char *, int);
char *BX_get_input_prompt (void);
char *BX_get_input (void);
void BX_update_input (int);
void init_input (void);
void input_move_cursor (int);
void change_input_prompt (int);
void BX_cursor_to_input (void);
/* keybinding functions */
void backward_character (char, char *);
void backward_history (char, char *);
void clear_screen (char, char *);
void command_completion (char, char *);
void forward_character (char, char *);
void forward_history (char, char *);
void highlight_off (char, char *);
void input_add_character (char, char *);
void input_backspace (char, char *);
void input_backward_word (char, char *);
void input_beginning_of_line (char, char *);
void new_input_beginning_of_line (char, char *);
void input_clear_line (char, char *);
void input_clear_to_bol (char, char *);
void input_clear_to_eol (char, char *);
void input_delete_character (char, char *);
void input_delete_next_word (char, char *);
void input_delete_previous_word (char, char *);
void input_delete_to_previous_space (char, char *);
void input_end_of_line (char, char *);
void input_forward_word (char, char *);
void input_transpose_characters (char, char *);
void input_yank_cut_buffer (char, char *);
void insert_bold (char, char *);
void insert_reverse (char, char *);
void insert_underline (char, char *);
void insert_blink (char, char *);
void insert_altcharset (char, char *);
void meta1_char (char, char *);
void meta2_char (char, char *);
void meta3_char (char, char *);
void meta4_char (char, char *);
void meta5_char (char, char *);
void meta6_char (char, char *);
void meta7_char (char, char *);
void meta8_char (char, char *);
void meta9_char (char, char *);
void meta10_char (char, char *);
void meta11_char (char, char *);
void meta12_char (char, char *);
void meta13_char (char, char *);
void meta14_char (char, char *);
void meta15_char (char, char *);
void meta16_char (char, char *);
void meta17_char (char, char *);
void meta18_char (char, char *);
void meta19_char (char, char *);
void meta20_char (char, char *);
void meta21_char (char, char *);
void meta22_char (char, char *);
void meta23_char (char, char *);
void meta24_char (char, char *);
void meta25_char (char, char *);
void meta26_char (char, char *);
void meta27_char (char, char *);
void meta28_char (char, char *);
void meta29_char (char, char *);
void meta30_char (char, char *);
void meta31_char (char, char *);
void meta32_char (char, char *);
void meta33_char (char, char *);
void meta34_char (char, char *);
void meta35_char (char, char *);
void meta36_char (char, char *);
void meta37_char (char, char *);
void meta38_char (char, char *);
void meta39_char (char, char *);
void refresh_inputline (char, char *);
void send_line (char, char *);
void toggle_insert_mode (char, char *);
void input_msgreply (char, char *);
void input_autoreply (char, char *);
void input_msgreplyback (char, char *);
void input_autoreplyback (char, char *);
void my_scrollback (char, char *);
void my_scrollforward (char, char *);
void my_scrollend (char, char *);
void wholeft (char, char *);
void toggle_cloak (char, char *);
void cdcc_plist (char, char *);
void dcc_plist (char, char *);
void channel_chops (char, char *);
void channel_nonops (char, char *);
void change_to_split (char, char *);
void do_chelp (char, char *);
void join_last_invite (char, char *);
void dcc_ostats (char, char *);
void window_swap1 (char, char *);
void window_swap2 (char, char *);
void window_swap3 (char, char *);
void window_swap4 (char, char *);
void window_swap5 (char, char *);
void window_swap6 (char, char *);
void window_swap7 (char, char *);
void window_swap8 (char, char *);
void window_swap9 (char, char *);
void window_swap10 (char, char *);
void w_help (char, char *);
void cpu_saver_on (char, char *);
void window_key_balance (char, char *);
void window_grow_one (char, char *);
void window_key_hide (char, char *);
void window_key_kill (char, char *);
void window_key_list (char, char *);
void window_key_move (char, char *);
void window_shrink_one (char, char *);
void nick_completion (char, char *);
void ignore_last_nick (char, char *);
void input_unclear_screen (char, char *);
void tab_completion (char, char *);
Lastlog *get_input_hold (Window *);
Display *get_screen_hold (Window *);
NickTab *BX_getnextnick (int, char *, char *, char *);
char *BX_getchannick (char *, char *);
NickList *BX_lookup_nickcompletion (ChannelList *, char *);
void paste_to_input (char, char *);
enum completion {
NO_COMPLETION,
TABKEY_COMPLETION,
NICK_COMPLETION,
COM_COMPLETION,
CHAN_COMPLETION,
EXEC_COMPLETION,
FILE_COMPLETION,
DCC_COMPLETION,
LOAD_COMPLETION,
SERVER_COMPLETION,
CDCC_COMPLETION
};
char *get_completions (enum completion, char *, int *, char **);
int BX_add_completion_type (char *, int, enum completion);
extern NickTab *tabkey_array;
extern NickTab *autoreply_array;
/* used by update_input */
#define NO_UPDATE 0
#define UPDATE_ALL 1
#define UPDATE_FROM_CURSOR 2
#define UPDATE_JUST_CURSOR 3
#ifdef GUI
void wm_process(int param);
#endif
#endif /* __input_h_ */

347
include/irc.h Normal file
View File

@@ -0,0 +1,347 @@
/*
* irc.h: header file for all of ircII!
*
* Written By Michael Sandrof
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: irc.h 206 2012-06-13 12:34:32Z keaston $
*/
#ifndef __irc_h
#define __irc_h
#define IRCII_COMMENT "\002 Keep it to yourself!\002"
#define BUG_EMAIL "<bitchx-devel@lists.sourceforge.net>"
#define FSET 1
#ifndef __irc_c
extern const char irc_version[];
extern const char internal_version[];
#endif
extern char *thing_ansi;
extern char thing_star[4];
/*
* Here you can set the in-line quote character, normally backslash, to
* whatever you want. Note that we use two backslashes since a backslash is
* also C's quote character. You do not need two of any other character.
*/
#define QUOTE_CHAR '\\'
#include "defs.h"
#include "config.h"
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <signal.h>
#include <sys/param.h>
#ifdef __EMX__
# ifdef __EMXPM__
# define AVIO_BUFFER 2048
# define INCL_GPI
# define INCL_AVIO
# define INCL_DOS
# endif
#define INCL_WIN /* Window Manager Functions */
#define INCL_BASE
#define INCL_VIO
#include <os2.h>
#elif defined(WINNT)
# include <windows.h>
# ifdef SOUND
# include <mmsystem.h>
# endif
#elif defined(GTK)
# include <gtk/gtk.h>
# include <gtk/gtkmenu.h>
#endif
#include <sys/socket.h>
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif /* HAVE_SYS_TIME_H */
#endif /* TIME_WITH_SYS_TIME */
#ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
#else
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif /* HAVE_FCNTL_H */
#endif
#include <stdarg.h>
#include <unistd.h>
#ifdef __EMX__
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0
#endif
#include "bsdglob.h"
#include "irc_std.h"
#include "debug.h"
#include "newio.h"
/* these define what characters do, inverse, underline, bold and all off */
#define REV_TOG '\026' /* ^V */
#define REV_TOG_STR "\026"
#define UND_TOG '\037' /* ^_ */
#define UND_TOG_STR "\037"
#define BOLD_TOG '\002' /* ^B */
#define BOLD_TOG_STR "\002"
#define ALL_OFF '\017' /* ^O */
#define ALL_OFF_STR "\017"
#define BLINK_TOG '\006' /* ^F (think flash) */
#define BLINK_TOG_STR "\006"
#define ROM_CHAR '\022' /* ^R */
#define ROM_CHAR_STR "\022"
#define ALT_TOG '\005' /* ^E (think Extended) */
#define ALT_TOG_STR "\005"
#define ND_SPACE '\023' /* ^S */
#define ND_SPACE_STR "\023"
#define IRCD_BUFFER_SIZE 512
#define BIG_BUFFER_SIZE (4 * IRCD_BUFFER_SIZE)
#define MAX_PROTOCOL_SIZE (IRCD_BUFFER_SIZE - 2)
#ifndef INPUT_BUFFER_SIZE
#define INPUT_BUFFER_SIZE (IRCD_BUFFER_SIZE - 20)
#endif
#define REFNUM_MAX 10
#ifndef RAND_MAX
#define RAND_MAX 2147483647
#endif
#define NICKNAME_LEN 30
#define NAME_LEN 80
#define REALNAME_LEN 50
#define PATH_LEN 1024
#ifndef MIN
#define MIN(a,b) ((a < b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) ((a > b) ? (a) : (b))
#endif
/* This section is for keeping track internally
* the CVS revision info of the running client.
* Since so many people are using CVS versions
* for debugging purposes it's good to know what
* file revisions they are running.
*/
#define CVS_REVISION(id) \
void id (char *buf) \
{ \
strcpy(buf, cvsrevision); \
}
void alias_c(char *);
void alist_c(char *);
void array_c(char *);
void banlist_c(char *);
void botlink_c(char *);
void cdcc_c(char *);
void chelp_c(char *);
void commands_c(char *);
void commands2_c(char *);
void cset_c(char *);
void ctcp_c(char *);
void dcc_c(char *);
void debug_c(char *);
void encrypt_c(char *);
void exec_c(char *);
void files_c(char *);
void flood_c(char *);
void fset_c(char *);
void functions_c(char *);
void funny_c(char *);
void hash_c(char *);
void help_c(char *);
void history_c(char *);
void hook_c(char *);
void if_c(char *);
void ignore_c(char *);
void input_c(char *);
void irc_c(char *);
void ircaux_c(char *);
void keys_c(char *);
void lastlog_c(char *);
void list_c(char *);
void log_c(char *);
void mail_c(char *);
void misc_c(char *);
void modules_c(char *);
void names_c(char *);
void network_c(char *);
void newio_c(char *);
void notice_c(char *);
void notify_c(char *);
void numbers_c(char *);
void output_c(char *);
void parse_c(char *);
void queue_c(char *);
void readlog_c(char *);
void reg_c(char *);
void screen_c(char *);
void server_c(char *);
void stack_c(char *);
void status_c(char *);
void struct_c(char *);
void tcl_public_c(char *);
void term_c(char *);
void timer_c(char *);
void translat_c(char *);
void user_c(char *);
void userlist_c(char *);
void vars_c(char *);
void who_c(char *);
void whowas_c(char *);
void window_c(char *);
void words_c(char *);
/*
* declared in irc.c
*/
extern int current_numeric;
extern char *cut_buffer;
extern char oper_command;
extern int irc_port;
extern int current_on_hook;
extern int use_flow_control;
extern char *joined_nick;
extern char *public_nick;
extern char empty_string[];
extern char zero[];
extern char one[];
extern char on[];
extern char off[];
extern char space[];
extern char space_plus[];
extern char space_minus[];
extern char dot[];
extern char star[];
extern char comma[];
extern char nickname[];
extern char *ircrc_file;
extern char *bircrc_file;
extern char *LocalHostName;
extern char hostname[];
extern char userhost[];
extern char realname[];
extern char username[];
extern char *send_umode;
extern char *last_notify_nick;
extern int away_set;
extern int background;
extern char *my_path;
extern char *irc_path;
extern char *irc_lib;
extern char *args_str;
extern char *invite_channel;
extern int who_mask;
extern char *who_name;
extern char *who_host;
extern char *who_server;
extern char *who_file;
extern char *who_nick;
extern char *who_real;
extern int dumb_mode;
extern int use_input;
extern time_t idle_time;
extern time_t now;
extern time_t start_time;
extern int waiting_out;
extern int waiting_in;
extern char wait_nick[];
extern char whois_nick[];
extern char lame_wait_nick[];
extern char **environ;
extern int cuprent_numeric;
extern int quick_startup;
extern char version[];
extern fd_set readables, writables;
extern int strip_ansi_in_echo;
extern int loading_global;
extern const unsigned long bitchx_numver;
extern const char *unknown_userhost;
extern char *forwardnick;
extern int inhibit_logging;
extern char MyHostName[];
extern struct sockaddr_foobar MyHostAddr;
extern struct sockaddr_foobar LocalHostAddr;
extern int cpu_saver;
extern struct sockaddr_foobar local_ip_address;
int BX_is_channel (char *);
void BX_irc_exit (int, char *, char *, ...);
void BX_beep_em (int);
void got_initial_version (char *);
void parse_notice (char *, char **);
void irc_quit (char, char *);
char get_a_char (void);
void load_scripts (void);
void clear_whowas (void);
void clear_variables (void);
void clear_fset (void);
void start_memdebug (void);
void dump_load_stack (int); /* XXX command.c */
const char * current_filename (void); /* XXX command.c */
int current_line (void); /* XXX command.c */
char *getenv (const char *);
void get_line_return (char, char *);
void get_line (char *, int, void (*)(char, char *));
void BX_io (const char *);
#ifdef NEED_OSPEED
/* We need this for broken linux systems. */
extern short ospeed;
#endif
void reattach_tty(char *, char *);
void init_socketpath(void);
void kill_attached_if_needed(int);
void setup_pid();
#ifdef CLOAKED
void initsetproctitle(int, char **, char **);
void setproctitle(const char *, ...);
#endif
#endif /* __irc_h */

254
include/irc_std.h Normal file
View File

@@ -0,0 +1,254 @@
/*
* irc_std.h: header to define things used in all the programs ircii
* comes with
*
* hacked together from various other files by matthew green
* copyright(c) 1993
*
* See the copyright file, or do a help ircii copyright
*
* @(#)$Id: irc_std.h 171 2012-05-10 12:31:04Z keaston $
*/
#ifndef __irc_std_h
#define __irc_std_h
#include "defs.h"
/*
* Everybody needs these ANSI headers...
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdarg.h>
#include <stddef.h>
/*
* Everybody needs these POSIX headers...
*/
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <limits.h>
#include <sys/param.h>
#include <errno.h>
/*
* Everybody needs these INET headers...
*/
#include <netinet/in.h>
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
/*
* Deal with brokenness in <time.h> and <sys/time.h>
*/
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
/*
* Deal with brokenness in <fcntl.h> and <sys/fcntl.h>
*/
#ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
#else
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
#endif
/*
* Deal with brokenness figuring out struct direct
*/
#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
# define dirent direct
# define NAMLEN(dirent) (dirent)->d_namlen
# if HAVE_SYS_NDIR_H
# include <sys/ndir.h>
# endif
# if HAVE_SYS_DIR_H
# include <sys/dir.h>
# endif
# if HAVE_NDIR_H
# include <ndir.h>
# endif
#endif
/*
* First try to figure out if we can use GNU CC special features...
*/
#ifndef __GNUC__
# define __inline /* delete gcc keyword */
# define __A(x)
# define __N
# define __inline__
#else
# if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7))
# define __A(x) __attribute__ ((format (printf, x, x + 1)))
# define __N __attribute__ ((noreturn))
# else
# define __A(x)
# define __N
# define __inline
# endif
#endif
/*
* Figure out how to make alloca work
* I took this from the autoconf documentation
*/
#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H)
# ifndef alloca
# define alloca __builtin_alloca
# endif
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca();
# endif
# endif
# endif
#endif
# include <errno.h>
#ifndef ERRNO_DECLARED
extern int errno;
#endif
#ifndef NBBY
# define NBBY 8 /* number of bits in a byte */
#endif /* NBBY */
#ifndef NFDBITS
# define NFDBITS (sizeof(long) * NBBY) /* bits per mask */
#endif /* NFDBITS */
#ifndef FD_SETSIZE
#define FD_SETSIZE 256
#endif
#ifndef howmany
#define howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
#include <limits.h>
typedef RETSIGTYPE sigfunc (int);
sigfunc *my_signal (int, sigfunc *, int);
#define SIGNAL_HANDLER(x) \
RETSIGTYPE x (int unused)
#include <stdlib.h>
#define index strchr
#ifndef MAXPATHLEN
#ifndef PATHSIZE
#define PATHSIZE 1024
#endif
#define MAXPATHLEN PATHSIZE
#endif
/*
* Dont trust anyone else's NULLs.
*/
#ifdef NULL
#undef NULL
#endif
#define NULL (void *) 0
#ifndef HAVE_STRERROR
#ifndef SYS_ERRLIST_DECLARED
extern char *sys_errlist[];
#endif
#define strerror(x) (char *)sys_errlist[x]
#endif
#if !defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)
extern int gettimeofday(struct timeval *tv, struct timezone *tz);
#endif
#ifndef GETPGID_DECLARED
pid_t getpgid (pid_t pid);
#endif
#ifndef KILLPG_DECLARED
int killpg (int pgrp, int sig);
#endif
#ifndef GETPASS_DECLARED
char * getpass (const char * prompt);
#endif
#ifndef BCOPY_DECLARED
void bcopy (const void *src, void *dest, size_t n);
#endif
#define BUILT_IN_COMMAND(x) \
void x (char *command, char *args, char *subargs, char *helparg)
#define BUILT_IN_FUNCTION(x) \
char * x (char *fn, char *input)
#if defined(_AIX)
int getpeername (int s, struct sockaddr *, int *);
int getsockname (int s, struct sockaddr *, int *);
int socket (int, int, int);
int bind (int, struct sockaddr *, int);
int listen (int, int);
int accept (int, struct sockaddr *, int *);
int recv (int, void *, int, unsigned int);
int send (int, void *, int, unsigned int);
int gettimeofday (struct timeval *, struct timezone *);
int gethostname (char *, int);
int setsockopt (int, int, int, void *, int);
int setitimer (int, struct itimerval *, struct itimerval *);
int ioctl (int, int, ...);
#endif
#ifdef __EMX__
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
#define ltoa(a) my_ltoa(a)
/*
* DCC specification requires exactly a 32 bit checksum.
* Kind of lame, actually.
*/
#ifdef UNSIGNED_LONG32
typedef unsigned long u_32int_t;
#else
# ifdef UNSIGNED_INT32
typedef unsigned int u_32int_t;
# else
typedef unsigned long u_32int_t;
# endif
#endif
#if !HAVE_DECL_SYS_SIGLIST && HAVE_DECL__SYS_SIGLIST
#define sys_siglist _sys_siglist
#endif
#endif /* __irc_std_h */

294
include/ircaux.h Normal file
View File

@@ -0,0 +1,294 @@
/*
* ircaux.h: header file for ircaux.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: ircaux.h 80 2009-11-24 10:21:30Z keaston $
*/
#ifndef _IRCAUX_H_
#define _IRCAUX_H_
#include "irc.h"
#include "irc_std.h"
#include <stdio.h>
#ifdef WANT_TCL
#undef USE_TCLALLOC
#include <tcl.h>
#endif
typedef int comp_len_func (char *, char *, int);
typedef int comp_func (char *, char *);
extern unsigned char stricmp_table[];
char * BX_check_nickname (char *);
char * BX_next_arg (char *, char **);
char * BX_new_next_arg (char *, char **);
char * BX_new_new_next_arg (char *, char **, char *);
char * BX_last_arg (char **);
char * BX_expand_twiddle (char *);
char * BX_upper (char *);
char * BX_lower (char *);
char * BX_sindex (register char *, char *);
char * BX_rsindex (register char *, char *, char *, int);
char * BX_path_search (char *, char *);
char * BX_double_quote (const char *, const char *, char *);
char * quote_it (const char *, const char *, char *);
char * n_malloc_strcpy (char **, const char *, const char *, const char *, const int);
char * BX_malloc_str2cpy (char **, const char *, const char *);
char * n_malloc_strcat (char **, const char *, const char *, const char *, const int);
char * BX_m_s3cat_s (char **, const char *, const char *);
char * BX_m_s3cat (char **, const char *, const char *);
char * BX_m_3cat (char **, const char *, const char *);
char * BX_m_e3cat (char **, const char *, const char *);
char * BX_m_2dup (const char *, const char *);
char * BX_m_3dup (const char *, const char *, const char *);
char * BX_m_opendup (const char *, ...);
char * n_m_strdup (const char *, const char *, const char *, const int);
char * BX_malloc_sprintf (char **, const char *, ...);
char * BX_m_sprintf (const char *, ...);
int BX_is_number (const char *);
char * BX_my_ctime (time_t);
#if 0
#define my_stricmp(x, y) strcasecmp(x, y) /* unable to use these for reasons of case sensitivity and finish */
#define my_strnicmp(x, y, n) strncasecmp(x, y, n)
#else
int BX_my_stricmp (const char *, const char *);
int BX_my_strnicmp (const char *, const char *, size_t);
#endif
int BX_my_strnstr (const unsigned char *, const unsigned char *, size_t);
int BX_scanstr (char *, char *);
void really_free (int);
char * BX_chop (char *, int);
char * BX_strmcpy (char *, const char *, int);
char * BX_strmcat (char *, const char *, int);
char * strmcat_ue (char *, const char *, int);
char * n_m_strcat_ues (char **, char *, int, const char *, const char *, const int);
char * BX_stristr (const char *, const char *);
char * BX_rstristr (char *, char *);
FILE * BX_uzfopen (char **, char *, int);
int BX_end_strcmp (const char *, const char *, int);
void BX_ircpanic (char *, ...);
int fw_strcmp (comp_len_func *, char *, char *);
int lw_strcmp (comp_func *, char *, char *);
int open_to (char *, int, off_t);
struct timeval BX_get_time (struct timeval *);
double BX_time_diff (struct timeval, struct timeval);
char * BX_plural (int);
int BX_time_to_next_minute (void);
char * BX_remove_trailing_spaces (char *);
char * BX_my_ltoa (long);
char * BX_strformat (char *, const char *, int, char);
char * chop_word (char *);
int BX_splitw (char *, char ***);
char * BX_unsplitw (char ***, int);
int BX_check_val (char *);
char * BX_strextend (char *, char, int);
char * strext (char *, char *);
char * BX_pullstr (char *, char *);
int BX_empty (const char *);
char * safe_new_next_arg (char *, char **);
char * BX_MatchingBracket (register char *, register char, register char);
int BX_word_count (char *);
int BX_parse_number (char **);
char * BX_remove_brackets (const char *, const char *, int *);
u_long hashpjw (char *, u_long);
char * BX_m_dupchar (int);
char * BX_strmccat (char *, char, int);
off_t file_size (char *);
int is_root (char *, char *, int);
size_t BX_streq (const char *, const char *);
size_t BX_strieq (const char *, const char *);
char * n_m_strndup (const char *, size_t, const char *, const char *, const int);
char * BX_on_off (int);
char * BX_rfgets (char *, int, FILE *);
char * BX_strmopencat (char *, int, ...);
long BX_my_atol (const char *);
char * s_next_arg (char **);
char * BX_next_in_comma_list (char *, char **);
void BX_strip_control (const char *, char *);
int BX_figure_out_address (char *, char **, char **, char **, char **, int *);
int count_char (const unsigned char *, const unsigned char);
char * BX_strnrchr (char *, char, int);
void BX_mask_digits (char **);
const char *BX_strfill (char, int);
char * BX_ov_strcpy (char *, const char *);
char * BX_strpcat (char *, const char *, ...);
char * BX_strmpcat (char *, size_t, const char *, ...);
char * chomp (char *);
size_t BX_ccspan (const char *, int);
u_char *BX_strcpy_nocolorcodes (u_char *, const u_char *);
u_long BX_random_number (u_long);
char * get_userhost (void);
char * urlencode (const char *);
char * urldecode (char *);
/* From words.c */
#define SOS -32767
#define EOS 32767
char *BX_strsearch (register char *, char *, char *, int);
char *BX_move_to_abs_word (const register char *, char **, int);
char *BX_move_word_rel (const register char *, char **, int);
char *BX_extract (char *, int, int);
char *BX_extract2 (const char *, int, int);
int BX_wild_match (const char *, const char *);
/* Used for connect_by_number */
#define SERVICE_SERVER 0
#define SERVICE_CLIENT 1
#define PROTOCOL_TCP 0
#define PROTOCOL_UDP 1
/* Used from network.c */
int BX_connect_by_number (char *, unsigned short *, int, int, int);
struct sockaddr_foobar * BX_lookup_host(const char *);
char * BX_host_to_ip (const char *);
char * BX_ip_to_host (const char *);
char * BX_one_to_another (const char *);
int BX_set_blocking (int);
int BX_set_non_blocking (int);
int my_accept (int, struct sockaddr *, int *);
int lame_resolv (const char *, struct sockaddr_foobar *);
#define my_isspace(x) \
((x) == 9 || (x) == 10 || (x) == 11 || (x) == 12 || (x) == 13 || (x) == 32)
#define my_isdigit(x) \
(*x >= '0' && *x <= '9') || \
((*x == '-' || *x == '+') && (x[1] >= '0' && x[1] <= '9'))
#define LOCAL_COPY(y) strcpy(alloca(strlen((y)) + 1), y)
#define _1KB ((double) 1000)
#define _1MEG (_1KB * _1KB)
#define _1GIG (_1KB * _1KB * _1KB)
#define _1TER (_1KB * _1KB * _1KB * _1KB)
#define _1ETA (_1KB * _1KB * _1KB * _1KB * _1KB)
#if 0
#define _1MEG (1024.0*1024.0)
#define _1GIG (1024.0*1024.0*1024.0)
#define _1TER (1024.0*1024.0*1024.0*1024.0)
#define _1ETA (1024.0*1024.0*1024.0*1024.0*1024.0)
#endif
#define _GMKs(x) ( ((double)x > _1ETA) ? "eb" : \
(((double)x > _1TER) ? "tb" : (((double)x > _1GIG) ? "gb" : \
(((double)x > _1MEG) ? "mb" : (((double)x > _1KB)? "kb" : "bytes")))))
#define _GMKv(x) (((double)x > _1ETA) ? \
((double)x/_1ETA) : (((double)x > _1TER) ? \
((double)x/_1TER) : (((double)x > _1GIG) ? \
((double)x/_1GIG) : (((double)x > _1MEG) ? \
((double)x/_1MEG) : (((double)x > _1KB) ? \
((double)x/_1KB): (double)x)))) )
void *n_malloc (size_t, const char *, const char *, const int);
void *n_realloc (void *, size_t, const char *, const char *, const int);
void *n_free (void *, const char *, const char *, const int);
#define MODULENAME NULL
#define new_malloc(x) n_malloc(x, MODULENAME, __FILE__, __LINE__)
#define new_free(x) (*(x) = n_free(*(x), MODULENAME, __FILE__, __LINE__))
#define RESIZE(x, y, z) ((x) = n_realloc((x), sizeof(y) * (z), MODULENAME, __FILE__, __LINE__))
#define malloc_strcpy(x, y) n_malloc_strcpy((char **)x, (char *)y, MODULENAME, __FILE__, __LINE__)
#define malloc_strcat(x, y) n_malloc_strcat((char **)x, (char *)y, MODULENAME, __FILE__, __LINE__)
#define m_strdup(x) n_m_strdup(x, MODULENAME, __FILE__, __LINE__)
#define m_strcat_ues(x, y, z) n_m_strcat_ues(x, y, z, MODULENAME, __FILE__, __LINE__)
#define m_strndup(x, y) n_m_strndup(x, y, MODULENAME, __FILE__, __LINE__)
char *encode (const char *, int);
char *decode (const char *);
char *BX_cryptit (const char *);
int checkpass (const char *, const char *);
/* Used for the inbound mangling stuff */
#define MANGLE_ESCAPES 1 << 0
#define MANGLE_ANSI_CODES 1 << 1
#define STRIP_COLOR 1 << 2
#define STRIP_REVERSE 1 << 3
#define STRIP_UNDERLINE 1 << 4
#define STRIP_BOLD 1 << 5
#define STRIP_BLINK 1 << 6
#define STRIP_ROM_CHAR 1 << 7
#define STRIP_ND_SPACE 1 << 8
#define STRIP_ALL_OFF 1 << 9
#define STRIP_ALT_CHAR 1 << 10
#define PRE_MANGLE 1 << 11
extern int outbound_line_mangler;
extern int inbound_line_mangler;
extern int logfile_line_mangler;
extern int operlog_line_mangler;
size_t BX_mangle_line (char *, int, size_t);
int BX_charcount (const char *, char);
char *BX_stripdev (char *);
char *convert_dos (char *);
char *convert_unix (char *);
int is_dos (char *);
void strip_chars (char *, char *, char);
char *longcomma (long);
char *ulongcomma (unsigned long);
#define SAFE(x) (((x) && *(x)) ? (x) : empty_string)
/* Used in compat.c */
#ifndef HAVE_TPARM
char *tparm (const char *, ...);
#endif
int my_base64_encode (const void *, int, char **);
#ifndef HAVE_STRTOUL
unsigned long strtoul (const char *, char **, int);
#endif
char * bsd_getenv (const char *);
int bsd_putenv (const char *);
int bsd_setenv (const char *, const char *, int);
void bsd_unsetenv (const char *);
#ifndef HAVE_INET_ATON
int inet_aton (const char *, struct in_addr *);
#endif
#ifndef HAVE_STRLCPY
size_t strlcpy (char *, const char *, size_t);
#endif
#ifndef HAVE_STRLCAT
size_t strlcat (char *, const char *, size_t);
#endif
#ifndef HAVE_VSNPRINTF
int vsnprintf (char *, size_t, const char *, va_list);
#endif
#ifndef HAVE_SNPRINTF
int snprintf (char *, size_t, const char *, ...);
#endif
#ifndef HAVE_SETSID
int setsid (void);
#endif
#endif /* _IRCAUX_H_ */

749
include/ircterm.h Normal file
View File

@@ -0,0 +1,749 @@
/*
* term.h: header file for term.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: ircterm.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef _TERM_H_
# define _TERM_H_
#ifdef HAVE_NCURSES_H
# include <ncurses.h>
# ifdef HAVE_NCURSES_TERMCAP_H
# include <ncurses/termcap.h>
# elif defined(HAVE_TERMCAP_H)
# ifndef __CYGWIN__
# include <termcap.h>
# endif
# endif
#else
# ifdef HAVE_CURSES_H
# include <curses.h>
# endif
# ifdef HAVE_TERMCAP_H
# include <termcap.h>
# endif
#endif
#ifdef __EMX__
#include <termcap.h>
#endif
#include "irc_std.h"
#include "screen.h"
extern int need_redraw;
extern int meta_mode;
/*
* This puts a character to the current target, whatever it is.
* All output everywhere should go through this.
* This does not mangle its output, so its suitable for outputting
* escape sequences.
*/
#if !defined(WTERM_C) && !defined(WSERV_C)
#define current_ftarget (output_screen ? output_screen->fpout : stdout)
#ifdef __EMXPM__
void avio_set_var(int aviovar, int value);
int avio_get_var(int aviovar);
void avio_refresh_screen(void);
#define AVIOREDRAW 1
#define AVIORESIZED 2
#define AVIOINSELECT 3
#define AVIOINWMCHAR 4
#endif
#ifdef GUI
#include "gui.h"
#endif
#ifdef TRANSLATE
#include "translat.h"
__inline__
static int putchar_x (int c) {
#ifdef GUI
#if 1
return gui_putc((int) (translation ? transToClient[c] : c));
#else
return gui_putc((int) c);
#endif
#else
#if 1
return fputc((int) (translation ? transToClient[c] : c), current_ftarget);
#else
return fputc((int) c, current_ftarget);
#endif
#endif
}
#else
__inline__
static int putchar_x (int c) {
#ifdef GUI
return gui_putc((int) c);
#else
return fputc((unsigned int) c, current_ftarget);
#endif
}
#endif
__inline__
static void term_flush (void) { fflush(current_ftarget); }
#define TERM_SGR_BOLD_ON 1
#define TERM_SGR_BOLD_OFF 2
#define TERM_SGR_BLINK_ON 3
#define TERM_SGR_BLINK_OFF 4
#define TERM_SGR_UNDL_ON 5
#define TERM_SGR_UNDL_OFF 6
#define TERM_SGR_REV_ON 7
#define TERM_SGR_REV_OFF 8
#define TERM_SGR_NORMAL 9
#define TERM_SGR_RESET 10
#define TERM_SGR_FOREGROUND 11
#define TERM_SGR_BACKGROUND 12
#define TERM_SGR_GCHAR 13
#define TERM_SGR_ALTCHAR_ON 14
#define TERM_SGR_ALTCHAR_OFF 15
#define TERM_SGR_MAXVAL 16
#define TERM_CAN_CUP 1 << 0
#define TERM_CAN_CLEAR 1 << 1
#define TERM_CAN_CLREOL 1 << 2
#define TERM_CAN_RIGHT 1 << 3
#define TERM_CAN_LEFT 1 << 4
#define TERM_CAN_SCROLL 1 << 5
#define TERM_CAN_DELETE 1 << 6
#define TERM_CAN_INSERT 1 << 7
#define TERM_CAN_DELLINES 1 << 8
#define TERM_CAN_INSLINES 1 << 9
#define TERM_CAN_REPEAT 1 << 10
#define TERM_CAN_BOLD 1 << 11
#define TERM_CAN_BLINK 1 << 12
#define TERM_CAN_UNDL 1 << 13
#define TERM_CAN_REVERSE 1 << 14
#define TERM_CAN_COLOR 1 << 15
#define TERM_CAN_GCHAR 1 << 16
#if 0
extern char *TI_cr, *TI_nl;
extern int TI_lines, TI_cols;
extern char *TI_sgrstrs[];
extern char *TI_forecolors[];
extern char *TI_backcolors[];
#endif
extern int termfeatures;
/* Our variable name Cap / Info Description */
struct term_struct {
int TI_bw; /* bw / bw cub1 wraps from column 0 to last column */
int TI_am; /* am / am terminal has automatic margins */
int TI_xsb; /* xb / xsb beehive (f1=escape, f2=ctrl C) */
int TI_xhp; /* xs / xhp standout not erased by overwriting (hp) */
int TI_xenl; /* xn / xenl newline ignored after 80 cols (concept) */
int TI_eo; /* eo / eo can erase overstrikes with a blank */
int TI_gn; /* gn / gn generic line type */
int TI_hc; /* hc / hc hardcopy terminal */
int TI_km; /* km / km Has a meta key (shift, sets parity bit) */
int TI_hs; /* hs / hs has extra status line */
int TI_in; /* in / in insert mode distinguishes nulls */
int TI_da; /* da / da display may be retained above the screen */
int TI_db; /* db / db display may be retained below the screen */
int TI_mir; /* mi / mir safe to move while in insert mode */
int TI_msgr; /* ms / msgr safe to move while in standout mode */
int TI_os; /* os / os terminal can overstrike */
int TI_eslok; /* es / eslok escape can be used on the status line */
int TI_xt; /* xt / xt tabs destructive, magic so char (t1061) */
int TI_hz; /* hz / hz can't print ~'s (hazeltine) */
int TI_ul; /* ul / ul underline character overstrikes */
int TI_xon; /* xo / xon terminal uses xon/xoff handshaking */
int TI_nxon; /* nx / nxon padding won't work, xon/xoff required */
int TI_mc5i; /* 5i / mc5i printer won't echo on screen */
int TI_chts; /* HC / chts cursor is hard to see */
int TI_nrrmc; /* NR / nrrmc smcup does not reverse rmcup */
int TI_npc; /* NP / npc pad character does not exist */
int TI_ndscr; /* ND / ndscr scrolling region is non-destructive */
int TI_ccc; /* cc / ccc terminal can re-define existing colors */
int TI_bce; /* ut / bce screen erased with background color */
int TI_hls; /* hl / hls terminal uses only HLS color notation (Tektronix) */
int TI_xhpa; /* YA / xhpa only positive motion for hpa/mhpa caps */
int TI_crxm; /* YB / crxm using cr turns off micro mode */
int TI_daisy; /* YC / daisy printer needs operator to change character set */
int TI_xvpa; /* YD / xvpa only positive motion for vpa/mvpa caps */
int TI_sam; /* YE / sam printing in last column causes cr */
int TI_cpix; /* YF / cpix changing character pitch changes resolution */
int TI_lpix; /* YG / lpix changing line pitch changes resolution */
int TI_cols; /* co / cols number of columns in a line */
int TI_it; /* it / it tabs initially every # spaces */
int TI_lines; /* li / lines number of lines on screen or page */
int TI_lm; /* lm / lm lines of memory if > line. 0 means varies */
int TI_xmc; /* sg / xmc number of blank characters left by smso or rmso */
int TI_pb; /* pb / pb lowest baud rate where padding needed */
int TI_vt; /* vt / vt virtual terminal number (CB/unix) */
int TI_wsl; /* ws / wsl number of columns in status line */
int TI_nlab; /* Nl / nlab number of labels on screen */
int TI_lh; /* lh / lh rows in each label */
int TI_lw; /* lw / lw columns in each label */
int TI_ma; /* ma / ma maximum combined attributes terminal can handle */
int TI_wnum; /* MW / wnum maximum number of defineable windows */
int TI_colors; /* Co / colors maximum number of colors on screen */
int TI_pairs; /* pa / pairs maximum number of color-pairs on the screen */
int TI_ncv; /* NC / ncv video attributes that can't be used with colors */
int TI_bufsz; /* Ya / bufsz numbers of bytes buffered before printing */
int TI_spinv; /* Yb / spinv spacing of pins vertically in pins per inch */
int TI_spinh; /* Yc / spinh spacing of dots horizontally in dots per inch */
int TI_maddr; /* Yd / maddr maximum value in micro_..._address */
int TI_mjump; /* Ye / mjump maximum value in parm_..._micro */
int TI_mcs; /* Yf / mcs character step size when in micro mode */
int TI_mls; /* Yg / mls line step size when in micro mode */
int TI_npins; /* Yh / npins numbers of pins in print-head */
int TI_orc; /* Yi / orc horizontal resolution in units per line */
int TI_orl; /* Yj / orl vertical resolution in units per line */
int TI_orhi; /* Yk / orhi horizontal resolution in units per inch */
int TI_orvi; /* Yl / orvi vertical resolution in units per inch */
int TI_cps; /* Ym / cps print rate in characters per second */
int TI_widcs; /* Yn / widcs character step size when in double wide mode */
int TI_btns; /* BT / btns number of buttons on mouse */
int TI_bitwin; /* Yo / bitwin number of passes for each bit-image row */
int TI_bitype; /* Yp / bitype type of bit-image device */
char *TI_cbt; /* bt / cbt back tab (P) */
char *TI_bel; /* bl / bel audible signal (bell) (P) */
char *TI_cr; /* cr / cr carriage return (P*) (P*) */
char *TI_csr; /* cs / csr change region to line #1 to line #2 (P) */
char *TI_tbc; /* ct / tbc clear all tab stops (P) */
char *TI_clear; /* cl / clear clear screen and home cursor (P*) */
char *TI_el; /* ce / el clear to end of line (P) */
char *TI_ed; /* cd / ed clear to end of screen (P*) */
char *TI_hpa; /* ch / hpa horizontal position #1, absolute (P) */
char *TI_cmdch; /* CC / cmdch terminal settable cmd character in prototype !? */
char *TI_cup; /* cm / cup move to row #1 columns #2 */
char *TI_cud1; /* do / cud1 down one line */
char *TI_home; /* ho / home home cursor (if no cup) */
char *TI_civis; /* vi / civis make cursor invisible */
char *TI_cub1; /* le / cub1 move left one space */
char *TI_mrcup; /* CM / mrcup memory relative cursor addressing */
char *TI_cnorm; /* ve / cnorm make cursor appear normal (undo civis/cvvis) */
char *TI_cuf1; /* nd / cuf1 non-destructive space (move right one space) */
char *TI_ll; /* ll / ll last line, first column (if no cup) */
char *TI_cuu1; /* up / cuu1 up one line */
char *TI_cvvis; /* vs / cvvis make cursor very visible */
char *TI_dch1; /* dc / dch1 delete character (P*) */
char *TI_dl1; /* dl / dl1 delete line (P*) */
char *TI_dsl; /* ds / dsl disable status line */
char *TI_hd; /* hd / hd half a line down */
char *TI_smacs; /* as / smacs start alternate character set (P) */
char *TI_blink; /* mb / blink turn on blinking */
char *TI_bold; /* md / bold turn on bold (extra bright) mode */
char *TI_smcup; /* ti / smcup string to start programs using cup */
char *TI_smdc; /* dm / smdc enter delete mode */
char *TI_dim; /* mh / dim turn on half-bright mode */
char *TI_smir; /* im / smir enter insert mode */
char *TI_invis; /* mk / invis turn on blank mode (characters invisible) */
char *TI_prot; /* mp / prot turn on protected mode */
char *TI_rev; /* mr / rev turn on reverse video mode */
char *TI_smso; /* so / smso begin standout mode */
char *TI_smul; /* us / smul begin underline mode */
char *TI_ech; /* ec / ech erase #1 characters (P) */
char *TI_rmacs; /* ae / rmacs end alternate character set (P) */
char *TI_sgr0; /* me / sgr0 turn off all attributes */
char *TI_rmcup; /* te / rmcup strings to end programs using cup */
char *TI_rmdc; /* ed / rmdc end delete mode */
char *TI_rmir; /* ei / rmir exit insert mode */
char *TI_rmso; /* se / rmso exit standout mode */
char *TI_rmul; /* ue / rmul exit underline mode */
char *TI_flash; /* vb / flash visible bell (may not move cursor) */
char *TI_ff; /* ff / ff hardcopy terminal page eject (P*) */
char *TI_fsl; /* fs / fsl return from status line */
char *TI_is1; /* i1 / is1 initialization string */
char *TI_is2; /* is / is2 initialization string */
char *TI_is3; /* i3 / is3 initialization string */
char *TI_if; /* if / if name of initialization file */
char *TI_ich1; /* ic / ich1 insert character (P) */
char *TI_il1; /* al / il1 insert line (P*) */
char *TI_ip; /* ip / ip insert padding after inserted character */
char *TI_kbs; /* kb / kbs backspace key */
char *TI_ktbc; /* ka / ktbc clear-all-tabs key */
char *TI_kclr; /* kC / kclr clear-screen or erase key */
char *TI_kctab; /* kt / kctab clear-tab key */
char *TI_kdch1; /* kD / kdch1 delete-character key */
char *TI_kdl1; /* kL / kdl1 delete-line key */
char *TI_kcud1; /* kd / kcud1 down-arrow key */
char *TI_krmir; /* kM / krmir sent by rmir or smir in insert mode */
char *TI_kel; /* kE / kel clear-to-end-of-line key */
char *TI_ked; /* kS / ked clear-to-end-of-screen key */
char *TI_kf0; /* k0 / kf0 F0 function key */
char *TI_kf1; /* k1 / kf1 F1 function key */
char *TI_kf10; /* k; / kf10 F10 function key */
char *TI_kf2; /* k2 / kf2 F2 function key */
char *TI_kf3; /* k3 / kf3 F3 function key */
char *TI_kf4; /* k4 / kf4 F4 function key */
char *TI_kf5; /* k5 / kf5 F5 function key */
char *TI_kf6; /* k6 / kf6 F6 function key */
char *TI_kf7; /* k7 / kf7 F7 function key */
char *TI_kf8; /* k8 / kf8 F8 function key */
char *TI_kf9; /* k9 / kf9 F9 function key */
char *TI_khome; /* kh / khome home key */
char *TI_kich1; /* kI / kich1 insert-character key */
char *TI_kil1; /* kA / kil1 insert-line key */
char *TI_kcub1; /* kl / kcub1 left-arrow key */
char *TI_kll; /* kH / kll lower-left key (home down) */
char *TI_knp; /* kN / knp next-page key */
char *TI_kpp; /* kP / kpp previous-page key */
char *TI_kcuf1; /* kr / kcuf1 right-arrow key */
char *TI_kind; /* kF / kind scroll-forward key */
char *TI_kri; /* kR / kri scroll-backward key */
char *TI_khts; /* kT / khts set-tab key */
char *TI_kcuu1; /* ku / kcuu1 up-arrow key */
char *TI_rmkx; /* ke / rmkx leave 'keyboard_transmit' mode */
char *TI_smkx; /* ks / smkx enter 'keyboard_transmit' mode */
char *TI_lf0; /* l0 / lf0 label on function key f0 if not f0 */
char *TI_lf1; /* l1 / lf1 label on function key f1 if not f1 */
char *TI_lf10; /* la / lf10 label on function key f10 if not f10 */
char *TI_lf2; /* l2 / lf2 label on function key f2 if not f2 */
char *TI_lf3; /* l3 / lf3 label on function key f3 if not f3 */
char *TI_lf4; /* l4 / lf4 label on function key f4 if not f4 */
char *TI_lf5; /* l5 / lf5 label on function key f5 if not f5 */
char *TI_lf6; /* l6 / lf6 label on function key f6 if not f6 */
char *TI_lf7; /* l7 / lf7 label on function key f7 if not f7 */
char *TI_lf8; /* l8 / lf8 label on function key f8 if not f8 */
char *TI_lf9; /* l9 / lf9 label on function key f9 if not f9 */
char *TI_rmm; /* mo / rmm turn off meta mode */
char *TI_smm; /* mm / smm turn on meta mode (8th-bit on) */
char *TI_nel; /* nw / nel newline (behave like cr followed by lf) */
char *TI_pad; /* pc / pad padding char (instead of null) */
char *TI_dch; /* DC / dch delete #1 characters (P*) */
char *TI_dl; /* DL / dl delete #1 lines (P*) */
char *TI_cud; /* DO / cud down #1 lines (P*) */
char *TI_ich; /* IC / ich insert #1 characters (P*) */
char *TI_indn; /* SF / indn scroll forward #1 lines (P) */
char *TI_il; /* AL / il insert #1 lines (P*) */
char *TI_cub; /* LE / cub move #1 characters to the left (P) */
char *TI_cuf; /* RI / cuf move #1 characters to the right (P*) */
char *TI_rin; /* SR / rin scroll back #1 lines (P) */
char *TI_cuu; /* UP / cuu up #1 lines (P*) */
char *TI_pfkey; /* pk / pfkey program function key #1 to type string #2 */
char *TI_pfloc; /* pl / pfloc program function key #1 to execute string #2 */
char *TI_pfx; /* px / pfx program function key #1 to transmit string #2 */
char *TI_mc0; /* ps / mc0 print contents of screen */
char *TI_mc4; /* pf / mc4 turn off printer */
char *TI_mc5; /* po / mc5 turn on printer */
char *TI_rep; /* rp / rep repeat char #1 #2 times (P*) */
char *TI_rs1; /* r1 / rs1 reset string */
char *TI_rs2; /* r2 / rs2 reset string */
char *TI_rs3; /* r3 / rs3 reset string */
char *TI_rf; /* rf / rf name of reset file */
char *TI_rc; /* rc / rc restore cursor to position of last save_cursor */
char *TI_vpa; /* cv / vpa vertical position #1 absolute (P) */
char *TI_sc; /* sc / sc save current cursor position (P) */
char *TI_ind; /* sf / ind scroll text up (P) */
char *TI_ri; /* sr / ri scroll text down (P) */
char *TI_sgr; /* sa / sgr define video attributes #1-#9 (PG9) */
char *TI_hts; /* st / hts set a tab in every row, current columns */
char *TI_wind; /* wi / wind current window is lines #1-#2 cols #3-#4 */
char *TI_ht; /* ta / ht tab to next 8-space hardware tab stop */
char *TI_tsl; /* ts / tsl move to status line */
char *TI_uc; /* uc / uc underline char and move past it */
char *TI_hu; /* hu / hu half a line up */
char *TI_iprog; /* iP / iprog path name of program for initialization */
char *TI_ka1; /* K1 / ka1 upper left of keypad */
char *TI_ka3; /* K3 / ka3 upper right of keypad */
char *TI_kb2; /* K2 / kb2 center of keypad */
char *TI_kc1; /* K4 / kc1 lower left of keypad */
char *TI_kc3; /* K5 / kc3 lower right of keypad */
char *TI_mc5p; /* pO / mc5p turn on printer for #1 bytes */
char *TI_rmp; /* rP / rmp like ip but when in insert mode */
char *TI_acsc; /* ac / acsc graphics charset pairs, based on vt100 */
char *TI_pln; /* pn / pln program label #1 to show string #2 */
char *TI_kcbt; /* kB / kcbt back-tab key */
char *TI_smxon; /* SX / smxon turn on xon/xoff handshaking */
char *TI_rmxon; /* RX / rmxon turn off xon/xoff handshaking */
char *TI_smam; /* SA / smam turn on automatic margins */
char *TI_rmam; /* RA / rmam turn off automatic margins */
char *TI_xonc; /* XN / xonc XON character */
char *TI_xoffc; /* XF / xoffc XOFF character */
char *TI_enacs; /* eA / enacs enable alternate char set */
char *TI_smln; /* LO / smln turn on soft labels */
char *TI_rmln; /* LF / rmln turn off soft labels */
char *TI_kbeg; /* @1 / kbeg begin key */
char *TI_kcan; /* @2 / kcan cancel key */
char *TI_kclo; /* @3 / kclo close key */
char *TI_kcmd; /* @4 / kcmd command key */
char *TI_kcpy; /* @5 / kcpy copy key */
char *TI_kcrt; /* @6 / kcrt create key */
char *TI_kend; /* @7 / kend end key */
char *TI_kent; /* @8 / kent enter/send key */
char *TI_kext; /* @9 / kext exit key */
char *TI_kfnd; /* @0 / kfnd find key */
char *TI_khlp; /* %1 / khlp help key */
char *TI_kmrk; /* %2 / kmrk mark key */
char *TI_kmsg; /* %3 / kmsg message key */
char *TI_kmov; /* %4 / kmov move key */
char *TI_knxt; /* %5 / knxt next key */
char *TI_kopn; /* %6 / kopn open key */
char *TI_kopt; /* %7 / kopt options key */
char *TI_kprv; /* %8 / kprv previous key */
char *TI_kprt; /* %9 / kprt print key */
char *TI_krdo; /* %0 / krdo redo key */
char *TI_kref; /* &1 / kref reference key */
char *TI_krfr; /* &2 / krfr refresh key */
char *TI_krpl; /* &3 / krpl replace key */
char *TI_krst; /* &4 / krst restart key */
char *TI_kres; /* &5 / kres resume key */
char *TI_ksav; /* &6 / ksav save key */
char *TI_kspd; /* &7 / kspd suspend key */
char *TI_kund; /* &8 / kund undo key */
char *TI_kBEG; /* &9 / kBEG shifted begin key */
char *TI_kCAN; /* &0 / kCAN shifted cancel key */
char *TI_kCMD; /* *1 / kCMD shifted command key */
char *TI_kCPY; /* *2 / kCPY shifted copy key */
char *TI_kCRT; /* *3 / kCRT shifted create key */
char *TI_kDC; /* *4 / kDC shifted delete-character key */
char *TI_kDL; /* *5 / kDL shifted delete-line key */
char *TI_kslt; /* *6 / kslt select key */
char *TI_kEND; /* *7 / kEND shifted end key */
char *TI_kEOL; /* *8 / kEOL shifted clear-to-end-of-line key */
char *TI_kEXT; /* *9 / kEXT shifted exit key */
char *TI_kFND; /* *0 / kFND shifted find key */
char *TI_kHLP; /* #1 / kHLP shifted help key */
char *TI_kHOM; /* #2 / kHOM shifted home key */
char *TI_kIC; /* #3 / kIC shifted insert-character key */
char *TI_kLFT; /* #4 / kLFT shifted left-arrow key */
char *TI_kMSG; /* %a / kMSG shifted message key */
char *TI_kMOV; /* %b / kMOV shifted move key */
char *TI_kNXT; /* %c / kNXT shifted next key */
char *TI_kOPT; /* %d / kOPT shifted options key */
char *TI_kPRV; /* %e / kPRV shifted previous key */
char *TI_kPRT; /* %f / kPRT shifted print key */
char *TI_kRDO; /* %g / kRDO shifted redo key */
char *TI_kRPL; /* %h / kRPL shifted replace key */
char *TI_kRIT; /* %i / kRIT shifted right-arrow key */
char *TI_kRES; /* %j / kRES shifted resume key */
char *TI_kSAV; /* !1 / kSAV shifted save key */
char *TI_kSPD; /* !2 / kSPD shifted suspend key */
char *TI_kUND; /* !3 / kUND shifted undo key */
char *TI_rfi; /* RF / rfi send next input char (for ptys) */
char *TI_kf11; /* F1 / kf11 F11 function key */
char *TI_kf12; /* F2 / kf12 F12 function key */
char *TI_kf13; /* F3 / kf13 F13 function key */
char *TI_kf14; /* F4 / kf14 F14 function key */
char *TI_kf15; /* F5 / kf15 F15 function key */
char *TI_kf16; /* F6 / kf16 F16 function key */
char *TI_kf17; /* F7 / kf17 F17 function key */
char *TI_kf18; /* F8 / kf18 F18 function key */
char *TI_kf19; /* F9 / kf19 F19 function key */
char *TI_kf20; /* FA / kf20 F20 function key */
char *TI_kf21; /* FB / kf21 F21 function key */
char *TI_kf22; /* FC / kf22 F22 function key */
char *TI_kf23; /* FD / kf23 F23 function key */
char *TI_kf24; /* FE / kf24 F24 function key */
char *TI_kf25; /* FF / kf25 F25 function key */
char *TI_kf26; /* FG / kf26 F26 function key */
char *TI_kf27; /* FH / kf27 F27 function key */
char *TI_kf28; /* FI / kf28 F28 function key */
char *TI_kf29; /* FJ / kf29 F29 function key */
char *TI_kf30; /* FK / kf30 F30 function key */
char *TI_kf31; /* FL / kf31 F31 function key */
char *TI_kf32; /* FM / kf32 F32 function key */
char *TI_kf33; /* FN / kf33 F33 function key */
char *TI_kf34; /* FO / kf34 F34 function key */
char *TI_kf35; /* FP / kf35 F35 function key */
char *TI_kf36; /* FQ / kf36 F36 function key */
char *TI_kf37; /* FR / kf37 F37 function key */
char *TI_kf38; /* FS / kf38 F38 function key */
char *TI_kf39; /* FT / kf39 F39 function key */
char *TI_kf40; /* FU / kf40 F40 function key */
char *TI_kf41; /* FV / kf41 F41 function key */
char *TI_kf42; /* FW / kf42 F42 function key */
char *TI_kf43; /* FX / kf43 F43 function key */
char *TI_kf44; /* FY / kf44 F44 function key */
char *TI_kf45; /* FZ / kf45 F45 function key */
char *TI_kf46; /* Fa / kf46 F46 function key */
char *TI_kf47; /* Fb / kf47 F47 function key */
char *TI_kf48; /* Fc / kf48 F48 function key */
char *TI_kf49; /* Fd / kf49 F49 function key */
char *TI_kf50; /* Fe / kf50 F50 function key */
char *TI_kf51; /* Ff / kf51 F51 function key */
char *TI_kf52; /* Fg / kf52 F52 function key */
char *TI_kf53; /* Fh / kf53 F53 function key */
char *TI_kf54; /* Fi / kf54 F54 function key */
char *TI_kf55; /* Fj / kf55 F55 function key */
char *TI_kf56; /* Fk / kf56 F56 function key */
char *TI_kf57; /* Fl / kf57 F57 function key */
char *TI_kf58; /* Fm / kf58 F58 function key */
char *TI_kf59; /* Fn / kf59 F59 function key */
char *TI_kf60; /* Fo / kf60 F60 function key */
char *TI_kf61; /* Fp / kf61 F61 function key */
char *TI_kf62; /* Fq / kf62 F62 function key */
char *TI_kf63; /* Fr / kf63 F63 function key */
char *TI_el1; /* cb / el1 Clear to beginning of line */
char *TI_mgc; /* MC / mgc clear right and left soft margins */
char *TI_smgl; /* ML / smgl set left soft margin at current column */
char *TI_smgr; /* MR / smgr set right soft margin at current column */
char *TI_fln; /* Lf / fln label format */
char *TI_sclk; /* SC / sclk set clock, #1 hrs #2 mins #3 secs */
char *TI_dclk; /* DK / dclk display clock at (#1,#2) */
char *TI_rmclk; /* RC / rmclk remove clock */
char *TI_cwin; /* CW / cwin define a window #1 from #2,#3 to #4,#5 */
char *TI_wingo; /* WG / wingo go to window #1 */
char *TI_hup; /* HU / hup hang-up phone */
char *TI_dial; /* DI / dial dial number #1 */
char *TI_qdial; /* QD / qdial dial number #1 without checking */
char *TI_tone; /* TO / tone select touch tone dialing */
char *TI_pulse; /* PU / pulse select pulse dialing */
char *TI_hook; /* fh / hook flash switch hook */
char *TI_pause; /* PA / pause pause for 2-3 seconds */
char *TI_wait; /* WA / wait wait for dial-tone */
char *TI_u0; /* u0 / u0 User string #0 */
char *TI_u1; /* u1 / u1 User string #1 */
char *TI_u2; /* u2 / u2 User string #2 */
char *TI_u3; /* u3 / u3 User string #3 */
char *TI_u4; /* u4 / u4 User string #4 */
char *TI_u5; /* u5 / u5 User string #5 */
char *TI_u6; /* u6 / u6 User string #6 */
char *TI_u7; /* u7 / u7 User string #7 */
char *TI_u8; /* u8 / u8 User string #8 */
char *TI_u9; /* u9 / u9 User string #9 */
char *TI_op; /* op / op Set default pair to its original value */
char *TI_oc; /* oc / oc Set all color pairs to the original ones */
char *TI_initc; /* Ic / initc initialize color #1 to (#2,#3,#4) */
char *TI_initp; /* Ip / initp Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7) */
char *TI_scp; /* sp / scp Set current color pair to #1 */
char *TI_setf; /* Sf / setf Set foreground color #1 */
char *TI_setb; /* Sb / setb Set background color #1 */
char *TI_cpi; /* ZA / cpi Change number of characters per inch */
char *TI_lpi; /* ZB / lpi Change number of lines per inch */
char *TI_chr; /* ZC / chr Change horizontal resolution */
char *TI_cvr; /* ZD / cvr Change vertical resolution */
char *TI_defc; /* ZE / defc Define a character */
char *TI_swidm; /* ZF / swidm Enter double-wide mode */
char *TI_sdrfq; /* ZG / sdrfq Enter draft-quality mode */
char *TI_sitm; /* ZH / sitm Enter italic mode */
char *TI_slm; /* ZI / slm Start leftward carriage motion */
char *TI_smicm; /* ZJ / smicm Start micro-motion mode */
char *TI_snlq; /* ZK / snlq Enter NLQ mode */
char *TI_snrmq; /* ZL / snrmq Enter normal-quality mode */
char *TI_sshm; /* ZM / sshm Enter shadow-print mode */
char *TI_ssubm; /* ZN / ssubm Enter subscript mode */
char *TI_ssupm; /* ZO / ssupm Enter superscript mode */
char *TI_sum; /* ZP / sum Start upward carriage motion */
char *TI_rwidm; /* ZQ / rwidm End double-wide mode */
char *TI_ritm; /* ZR / ritm End italic mode */
char *TI_rlm; /* ZS / rlm End left-motion mode */
char *TI_rmicm; /* ZT / rmicm End micro-motion mode */
char *TI_rshm; /* ZU / rshm End shadow-print mode */
char *TI_rsubm; /* ZV / rsubm End subscript mode */
char *TI_rsupm; /* ZW / rsupm End superscript mode */
char *TI_rum; /* ZX / rum End reverse character motion */
char *TI_mhpa; /* ZY / mhpa Like column_address in micro mode */
char *TI_mcud1; /* ZZ / mcud1 Like cursor_down in micro mode */
char *TI_mcub1; /* Za / mcub1 Like cursor_left in micro mode */
char *TI_mcuf1; /* Zb / mcuf1 Like cursor_right in micro mode */
char *TI_mvpa; /* Zc / mvpa Like row_address in micro mode */
char *TI_mcuu1; /* Zd / mcuu1 Like cursor_up in micro mode */
char *TI_porder; /* Ze / porder Match software bits to print-head pins */
char *TI_mcud; /* Zf / mcud Like parm_down_cursor in micro mode */
char *TI_mcub; /* Zg / mcub Like parm_left_cursor in micro mode */
char *TI_mcuf; /* Zh / mcuf Like parm_right_cursor in micro mode */
char *TI_mcuu; /* Zi / mcuu Like parm_up_cursor in micro mode */
char *TI_scs; /* Zj / scs Select character set */
char *TI_smgb; /* Zk / smgb Set bottom margin at current line */
char *TI_smgbp; /* Zl / smgbp Set bottom margin at line #1 or #2 lines from bottom */
char *TI_smglp; /* Zm / smglp Set left (right) margin at column #1 (#2) */
char *TI_smgrp; /* Zn / smgrp Set right margin at column #1 */
char *TI_smgt; /* Zo / smgt Set top margin at current line */
char *TI_smgtp; /* Zp / smgtp Set top (bottom) margin at row #1 (#2) */
char *TI_sbim; /* Zq / sbim Start printing bit image graphics */
char *TI_scsd; /* Zr / scsd Start character set definition */
char *TI_rbim; /* Zs / rbim Stop printing bit image graphics */
char *TI_rcsd; /* Zt / rcsd End definition of character set */
char *TI_subcs; /* Zu / subcs List of subscriptable characters */
char *TI_supcs; /* Zv / supcs List of superscriptable characters */
char *TI_docr; /* Zw / docr Printing any of these characters causes CR */
char *TI_zerom; /* Zx / zerom No motion for subsequent character */
char *TI_csnm; /* Zy / csnm List of character set names */
char *TI_kmous; /* Km / kmous Mouse event has occurred */
char *TI_minfo; /* Mi / minfo Mouse status information */
char *TI_reqmp; /* RQ / reqmp Request mouse position */
char *TI_getm; /* Gm / getm Curses should get button events */
char *TI_setaf; /* AF / setaf Set foreground color using ANSI escape */
char *TI_setab; /* AB / setab Set background color using ANSI escape */
char *TI_pfxl; /* xl / pfxl Program function key #1 to type string #2 and show string #3 */
char *TI_devt; /* dv / devt Indicate language/codeset support */
char *TI_csin; /* ci / csin Init sequence for multiple codesets */
char *TI_s0ds; /* s0 / s0ds Shift to code set 0 (EUC set 0, ASCII) */
char *TI_s1ds; /* s1 / s1ds Shift to code set 1 */
char *TI_s2ds; /* s2 / s2ds Shift to code set 2 */
char *TI_s3ds; /* s3 / s3ds Shift to code set 3 */
char *TI_smglr; /* ML / smglr Set both left and right margins to #1, #2 */
char *TI_smgtb; /* MT / smgtb Sets both top and bottom margins to #1, #2 */
char *TI_birep; /* Xy / birep Repeat bit image cell #1 #2 times */
char *TI_binel; /* Zz / binel Move to next row of the bit image */
char *TI_bicr; /* Yv / bicr Move to beginning of same row */
char *TI_colornm; /* Yw / colornm Give name for color #1 */
char *TI_defbi; /* Yx / defbi Define rectangualar bit image region */
char *TI_endbi; /* Yy / endbi End a bit-image region */
char *TI_setcolor; /* Yz / setcolor Change to ribbon color #1 */
char *TI_slines; /* YZ / slines Set page length to #1 lines */
char *TI_dispc; /* S1 / dispc Display PC character */
char *TI_smpch; /* S2 / smpch Enter PC character display mode */
char *TI_rmpch; /* S3 / rmpch Exit PC character display mode */
char *TI_smsc; /* S4 / smsc Enter PC scancode mode */
char *TI_rmsc; /* S5 / rmsc Exit PC scancode mode */
char *TI_pctrm; /* S6 / pctrm PC terminal options */
char *TI_scesc; /* S7 / scesc Escape for scancode emulation */
char *TI_scesa; /* S8 / scesa Alternate escape for scancode emulation */
char *TI_ehhlm; /* Xh / ehhlm Enter horizontal highlight mode */
char *TI_elhlm; /* Xl / elhlm Enter left highlight mode */
char *TI_elohlm; /* Xo / elohlm Enter low highlight mode */
char *TI_erhlm; /* Xr / erhlm Enter right highlight mode */
char *TI_ethlm; /* Xt / ethlm Enter top highlight mode */
char *TI_evhlm; /* Xv / evhlm Enter vertical highlight mode */
char *TI_sgr1; /* sA / sgr1 Define second set of video attributes #1-#6 */
char *TI_slength; /* sL / slength YI Set page length to #1 hundredth of an inch */
char *TI_OTi2; /* i2 / OTi2 secondary initialization string */
char *TI_OTrs; /* rs / OTrs terminal reset string */
int TI_OTug; /* ug / OTug number of blanks left by ul */
int TI_OTbs; /* bs / OTbs uses ^H to move left */
int TI_OTns; /* ns / OTns crt cannot scroll */
int TI_OTnc; /* nc / OTnc no way to go to start of line */
int TI_OTdC; /* dC / OTdC pad needed for CR */
int TI_OTdN; /* dN / OTdN pad needed for LF */
char *TI_OTnl; /* nl / OTnl use to move down */
char *TI_OTbc; /* bc / OTbc move left, if not ^H */
int TI_OTMT; /* MT / OTMT has meta key */
int TI_OTNL; /* NL / OTNL move down with \n */
int TI_OTdB; /* dB / OTdB padding required for ^H */
int TI_OTdT; /* dT / OTdT padding required for ^I */
int TI_OTkn; /* kn / OTkn count of function keys */
char *TI_OTko; /* ko / OTko list of self-mapped keycaps */
char *TI_OTma; /* ma / OTma map arrow keys rogue(1) motion keys */
int TI_OTpt; /* pt / OTpt has 8-char tabs invoked with ^I */
int TI_OTxr; /* xr / OTxr return clears the line */
char *TI_OTG2; /* G2 / OTG2 single upper left */
char *TI_OTG3; /* G3 / OTG3 single lower left */
char *TI_OTG1; /* G1 / OTG1 single upper right */
char *TI_OTG4; /* G4 / OTG4 single lower right */
char *TI_OTGR; /* GR / OTGR tee pointing right */
char *TI_OTGL; /* GL / OTGL tee pointing left */
char *TI_OTGU; /* GU / OTGU tee pointing up */
char *TI_OTGD; /* GD / OTGD tee pointing down */
char *TI_OTGH; /* GH / OTGH single horizontal line */
char *TI_OTGV; /* GV / OTGV single vertical line */
char *TI_OTGC; /* GC / OTGC single intersection */
char *TI_meml; /* ml / meml memory lock above */
char *TI_memu; /* mu / memu memory unlock */
char *TI_box1; /* bx / box1 box characters primary set */
/* non termcap/terminfo terminal info (generated by epic) */
char TI_normal[256];
char *TI_sgrstrs[TERM_SGR_MAXVAL];
char *TI_forecolors[16];
char *TI_backcolors[16];
int TI_meta_mode;
/* int TI_need_redraw ; */
};
extern struct term_struct *current_term;
#define term_has(x) (termfeatures & (x))
#define capstr(x) (current_term->TI_sgrstrs[(TERM_SGR_ ## x)-1])
#define outcap(x) (tputs_x(capstr(x)))
#ifndef TERM_DEBUG
#define tputs_x(s) (tputs(s, 0, putchar_x))
#else
int tputs_x(char *);
#endif
#if 0
#define term_underline_on() outcap(UNDL_ON)
#define term_underline_off() outcap(UNDL_OFF)
#define term_standout_on() outcap(REV_ON)
#define term_standout_off() outcap(REV_OFF)
#define term_blink_on() outcap(BLINK_ON)
#define term_blink_off() outcap(BLINK_OFF)
#define term_bold_on() outcap(BOLD_ON)
#define term_bold_off() outcap(BOLD_OFF)
#define term_altcharset_on() outcap(ALTCHAR_ON)
#define term_altcharset_off() outcap(ALTCHAR_OFF)
#endif
#define term_underline_on() if (get_int_var(UNDERLINE_VIDEO_VAR)) \
outcap(UNDL_ON)
#define term_underline_off() if (get_int_var(UNDERLINE_VIDEO_VAR)) \
outcap(UNDL_OFF)
#define term_standout_on() if (get_int_var(INVERSE_VIDEO_VAR)) \
outcap(REV_ON)
#define term_standout_off() if (get_int_var(INVERSE_VIDEO_VAR)) \
outcap(REV_OFF)
#define term_blink_on() if (get_int_var(BLINK_VIDEO_VAR)) \
outcap(BLINK_ON)
#define term_blink_off() if (get_int_var(BLINK_VIDEO_VAR)) \
outcap(BLINK_OFF)
#define term_bold_on() if (get_int_var(BOLD_VIDEO_VAR)) \
outcap(BOLD_ON)
#define term_bold_off() if (get_int_var(BOLD_VIDEO_VAR)) \
outcap(BOLD_OFF)
#define term_altcharset_on() if (get_int_var(ALT_CHARSET_VAR)) \
outcap(ALTCHAR_ON)
#define term_altcharset_off() if (get_int_var(ALT_CHARSET_VAR)) \
outcap(ALTCHAR_OFF)
#define term_set_foreground(x) tputs_x(current_term->TI_forecolors[(x) & 0x0f])
#define term_set_background(x) tputs_x(current_term->TI_backcolors[(x) & 0x0f])
#define term_set_attribs(f,b) tputs_x(term_getsgr(TERM_SGR_COLORS,(f),(b)))
#define term_putgchar(x) tputs_x(term_getsgr(TERM_SGR_GCHAR,(x),0))
#define term_move_cursor(c, r) term_gotoxy((c),(r))
#define term_cr() tputs_x(current_term->TI_cr)
#define term_newline() tputs_x(current_term->TI_nel)
#define term_cursor_left() term_left(1)
#define term_cursor_right() term_right(1)
#define term_clear_to_eol() term_clreol()
#define term_clear_screen() term_clrscr()
#ifdef __EMX__
extern int vio_screen;
extern char default_pair[2];
#endif
#endif
RETSIGTYPE term_cont (int);
void term_beep (void);
int term_echo (int);
int term_init (char *);
int term_resize (void);
void term_pause (char, char *);
void term_putchar (unsigned char);
void term_scroll (int, int, int);
void term_insert (unsigned char);
void term_delete (int);
void term_repeat (unsigned char, int);
void term_right (int);
void term_left (int);
void term_clreol (void);
void term_clrscr (void);
void term_gotoxy (int, int);
void term_reset (void);
int term_eight_bit (void);
void set_term_eight_bit (int);
void set_meta_8bit (Window *, char *, int);
char * term_getsgr (int, int, int);
void reinit_term (int);
void term_reset2 (void);
void reset_cols (int);
void reset_lines (int);
char * term_getsgr (int, int, int);
char * get_term_capability (char *, int, int);
#if 0
#ifndef TPUTS_DECLARED
int tputs (const unsigned char *, int, int (*)(int));
#endif
#endif
#endif /* _TERM_H_ */

55
include/keys.h Normal file
View File

@@ -0,0 +1,55 @@
/*
* keys.h: header for keys.c
*
* Copyright 1990 Michael Sandrof
* Copyright 1997 EPIC Software Labs
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*/
#ifndef __keys_h__
#define __keys_h__
/* I hate typedefs... */
typedef void (*KeyBinding) (char, char *);
BUILT_IN_COMMAND(bindcmd);
BUILT_IN_COMMAND(rbindcmd);
BUILT_IN_COMMAND(parsekeycmd);
BUILT_IN_COMMAND(type);
int get_binding (int, unsigned char,
KeyBinding *, char **);
void save_bindings (FILE *, int);
void init_keys (void);
void init_keys2 (void);
void remove_bindings (void);
void unload_bindings (const char *);
void resize_metamap (int);
void disable_stop (void);
char *convert_to_keystr (char *);
#ifdef GUI
enum MOUSE_ACTIONS {
RCLICK,
STATUSRCLICK,
NICKLISTRCLICK,
LCLICK,
STATUSLCLICK,
NICKLISTLCLICK,
MCLICK,
STATUSMCLICK,
NICKLISTMCLICK,
RDBLCLICK,
STATUSRDBLCLICK,
NICKLISTRDBLCLICK,
LDBLCLICK,
STATUSLDBLCLICK,
NICKLISTLDBLCLICK,
MDBLCLICK,
STATUSMDBLCLICK,
NICKLISTMDBLCLICK,
MAX_MOUSE
};
#endif
#endif /* _KEYS_H_ */

91
include/lastlog.h Normal file
View File

@@ -0,0 +1,91 @@
/*
* lastlog.h: header for lastlog.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: lastlog.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __lastlog_h_
#define __lastlog_h_
#define LOG_NONE 0x00000000
#define LOG_CURRENT 0x00000000
#define LOG_CRAP 0x00000001
#define LOG_PUBLIC 0x00000002
#define LOG_MSG 0x00000004
#define LOG_NOTICE 0x00000008
#define LOG_WALL 0x00000010
#define LOG_WALLOP 0x00000020
#define LOG_NOTES 0x00000040
#define LOG_OPNOTE 0x00000080
#define LOG_SNOTE 0x00000100
#define LOG_ACTION 0x00000200
#define LOG_DCC 0x00000400
#define LOG_CTCP 0x00000800
#define LOG_USER1 0x00001000
#define LOG_USER2 0x00002000
#define LOG_USER3 0x00004000
#define LOG_USER4 0x00008000
#define LOG_USER5 0x00010000
#define LOG_BEEP 0x00020000
#define LOG_TCL 0x00040000
#define LOG_SEND_MSG 0x00080000
#define LOG_KILL 0x00100000
#define LOG_MODE_USER 0x00200000
#define LOG_MODE_CHAN 0x00400000
#define LOG_KICK 0x00800000
#define LOG_KICK_USER 0x01000000
#define LOG_PART 0x02000000
#define LOG_INVITE 0x04000000
#define LOG_JOIN 0x08000000
#define LOG_TOPIC 0x10000000
#define LOG_HELP 0x20000000
#define LOG_NOTIFY 0x40000000
#define LOG_DEBUG 0x80000000
#define LOG_ALL (LOG_CRAP | LOG_PUBLIC | LOG_MSG | LOG_NOTICE | LOG_WALL | \
LOG_WALLOP | LOG_NOTES | LOG_OPNOTE | LOG_SNOTE | LOG_ACTION | \
LOG_CTCP | LOG_DCC | LOG_USER1 | LOG_USER2 | LOG_USER3 | \
LOG_USER4 | LOG_USER5 | LOG_BEEP | LOG_TCL | LOG_SEND_MSG | \
LOG_MODE_USER | LOG_MODE_CHAN | LOG_KICK_USER | LOG_KICK | \
LOG_PART | LOG_INVITE | LOG_JOIN | LOG_TOPIC | LOG_HELP | \
LOG_KILL | LOG_NOTIFY)
# define LOG_DEFAULT LOG_NONE
void set_lastlog_level (Window *, char *, int);
unsigned long BX_set_lastlog_msg_level (unsigned long);
void set_lastlog_size (Window *, char *, int);
void set_notify_level (Window *, char *, int);
void set_msglog_level (Window *, char *, int);
void set_new_server_lastlog_level(Window *, char *, int);
BUILT_IN_COMMAND(lastlog);
void add_to_lastlog (Window *, const char *);
char *bits_to_lastlog_level (unsigned long);
unsigned long real_lastlog_level (void);
unsigned long real_notify_level (void);
unsigned long parse_lastlog_level (char *, int);
int islogged (Window *);
extern void remove_from_lastlog (Window *);
extern int grab_http (char *, char *, char *);
BUILT_IN_FUNCTION(function_line);
BUILT_IN_FUNCTION(function_lastlog);
extern unsigned long beep_on_level;
extern unsigned long new_server_lastlog_level;
void set_beep_on_msg(Window *, char *, int);
Lastlog *get_lastlog_current_head(Window *);
void free_lastlog(Window *);
int logmsg(unsigned long, char *, int, char *, ...);
void reset_hold_mode(Window *);
#endif /* __lastlog_h_ */

30
include/list.h Normal file
View File

@@ -0,0 +1,30 @@
/*
* list.h: header for list.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: list.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __list_h_
#define __list_h_
void BX_add_to_list (List **, List *);
List *BX_find_in_list (List **, char *, int);
List *BX_remove_from_list (List **, char *);
List *BX_removewild_from_list (List **, char *);
List *BX_list_lookup_ext (List **, char *, int, int, int (*)(List *, char *));
List *BX_list_lookup (List **, char *, int, int);
List *BX_remove_from_list_ext (List **, char *, int (*)(List *, char *));
void BX_add_to_list_ext (List **, List *, int (*)(List *, List *));
List *BX_find_in_list_ext (List **, char *, int, int (*)(List *, char *));
int list_strnicmp (List *item1, char *str);
#define REMOVE_FROM_LIST 1
#define USE_WILDCARDS 1
#endif /* __list_h_ */

22
include/log.h Normal file
View File

@@ -0,0 +1,22 @@
/*
* log.h: header for log.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: log.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __log_h_
#define __log_h_
void do_log (int, char *, FILE **);
void logger (Window *, char *, int);
void set_log_file (Window *, char *, int);
void BX_add_to_log (FILE *, time_t, const char *, int mangler);
#endif /* __log_h_ */

19
include/mail.h Normal file
View File

@@ -0,0 +1,19 @@
/*
* mail.h: header for mail.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: mail.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __mail_h_
#define __mail_h_
char *check_mail (void);
int check_mail_status (void);
#endif /* __mail_h_ */

236
include/misc.h Normal file
View File

@@ -0,0 +1,236 @@
/*
* Copyright Colten Edwards 1997.
* various miscellaneous routines needed for irc functions
*/
#ifndef _misc_h
#define _misc_h
#define KICKLIST 0x01
#define LEAVELIST 0x02
#define JOINLIST 0x03
#define CHANNELSIGNOFFLIST 0x04
#define PUBLICLIST 0x05
#define PUBLICOTHERLIST 0x06
#define PUBLICNOTICELIST 0x07
#define NOTICELIST 0x08
#define TOPICLIST 0x09
#define MODEOPLIST 0x0a
#define MODEDEOPLIST 0x0b
#define MODEBANLIST 0x0c
#define MODEUNBANLIST 0x0d
#define NICKLIST 0x0e
#define MODEHOPLIST 0x0f
#define MODEDEHOPLIST 0x10
#define MODEEBANLIST 0x11
#define MODEUNEBANLIST 0x12
enum color_attributes {
BLACK = 0, BLUE, GREEN, CYAN, RED, MAGENTA, YELLOW, WHITE,
BLACKB, BLUEB, GREENB, CYANB, REDB, MAGENTAB, YELLOWB, WHITEB,NO_COLOR,
BACK_BLACK, BACK_RED, BACK_GREEN, BACK_YELLOW,
BACK_BLUE, BACK_MAGENTA, BACK_CYAN, BACK_WHITE,
BACK_BBLACK, BACK_BRED, BACK_BGREEN, BACK_BYELLOW,
BACK_BBLUE, BACK_BMAGENTA, BACK_BCYAN, BACK_BWHITE,
REVERSE_COLOR, BOLD_COLOR, BLINK_COLOR, UNDERLINE_COLOR
};
/* prepare_command() flags */
#define PC_SILENT 3
#define PC_TOPIC 2
#define NEED_OP 1
#define NO_OP 0
extern char *color_str[];
extern int split_watch;
void clear_link (irc_server **);
extern irc_server *tmplink, *server_last;
#ifndef BITCHX_LITE
#define MAX_LAST_MSG 10
#else
#define MAX_LAST_MSG 2
#endif
extern LastMsg last_msg[MAX_LAST_MSG+1];
extern LastMsg last_dcc[MAX_LAST_MSG+1];
extern LastMsg last_sent_dcc[MAX_LAST_MSG+1];
extern LastMsg last_notice[MAX_LAST_MSG+1];
extern LastMsg last_servermsg[MAX_LAST_MSG+1];
extern LastMsg last_sent_msg[MAX_LAST_MSG+1];
extern LastMsg last_sent_notice[MAX_LAST_MSG+1];
extern LastMsg last_sent_topic[2];
extern LastMsg last_sent_wall[2];
extern LastMsg last_topic[2];
extern LastMsg last_wall[MAX_LAST_MSG+1];
extern LastMsg last_invite_channel[2];
extern LastMsg last_ctcp[2];
extern LastMsg last_ctcp_reply[2];
extern LastMsg last_sent_ctcp[2];
void put_user (const NickList *, const char *);
void update_stats (int, NickList *, ChannelList *, int);
int check_split (char *, char *);
void BX_userage (char *, char *);
void stats_k_grep_end (void);
char *stripansicodes (const char *);
char *stripansi (unsigned char *);
NickTab *BX_gettabkey (int, int, char *);
void BX_addtabkey (char *, char *, int);
void clear_array (NickTab **, char *);
char *BX_random_str (int, int);
int check_serverlag (void);
void check_auto_away (time_t);
ChannelList * BX_prepare_command (int *, char *, int);
int rename_file (char *, char **);
void putlog (int, ...);
void add_mode_buffer ( char *, int);
void flush_mode (ChannelList *);
void flush_mode_all (ChannelList *);
void add_mode (ChannelList *, char *, int, char *, char *, int);
int delay_flush_all (void *, char *);
char *clear_server_flags (char *);
char *ban_it (char *, char *, char *, char *);
void log_toggle (int, ChannelList *);
char *cluster (char *);
int caps_fucknut (register unsigned char *);
void do_reconnect (char *);
int are_you_opped (char *);
void error_not_opped (const char *);
char *get_reason (char *, char *);
char *get_realname(char *);
char *get_signoffreason (char *);
int isme (char *);
char *BX_convert_output_format (const char *, const char *, ...);
char *convert_output_format2 (const char *);
void add_last_type (LastMsg *, int, char *, char *, char *, char *);
int check_last_type (LastMsg *, int, char *, char *);
int matchmcommand (char *, int);
char *convert_time (time_t);
char *BX_make_channel(char *);
int timer_unban (void *, char *);
void check_server_connect (int);
const char *country(const char *);
int do_newuser (char *, char *, char *);
int char_fucknut (register unsigned char *, char, int);
BanList *ban_is_on_channel(register char *, register ChannelList *);
BanList *eban_is_on_channel(register char *, register ChannelList *);
void check_orig_nick(char *);
char *do_nslookup (char *, char *, char *, char *, int, void (*func)(), char *);
void set_nslookupfd(fd_set *);
long print_nslookup(fd_set *);
void auto_nslookup();
int freadln(FILE *, char *);
void BX_close_socketread(int);
int BX_add_socketread(int, int, unsigned long, char *, void (*func_read)(int), void (*func_write)(int));
int BX_check_socket(int);
void set_socket_read (fd_set *, fd_set *);
void scan_sockets (fd_set *, fd_set *);
void read_clonelist(int);
void read_clonenotify(int);
void read_netfinger(int);
int BX_write_sockets(int, unsigned char *, int, int);
int BX_read_sockets(int, unsigned char *, int);
unsigned long BX_set_socketflags(int, unsigned long);
void *BX_get_socketinfo(int);
void BX_set_socketinfo(int, void *);
unsigned long BX_get_socketflags(int);
char *get_socketserver(int);
SocketList *BX_get_socket(int);
void BX_add_sockettimeout(int, time_t, void *);
int BX_get_max_fd(void);
int BX_set_socketwrite(int);
#ifdef GUI
void scan_gui(fd_set *);
#endif
#ifdef WANT_NSLOOKUP
/*
* alib.h (C)opyright 1992 Darren Reed.
*/
#define ARES_INITLIST 1
#define ARES_CALLINIT 2
#define ARES_INITSOCK 4
#define ARES_INITDEBG 8
#define ARES_INITCACH 16
#define MAXPACKET 1024
#define MAXALIASES 35
#define MAXADDRS 35
#define RES_CHECKPTR 0x0400
struct hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct in_addr h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
};
struct resinfo {
char *ri_ptr;
int ri_size;
};
struct reslist {
int re_id;
char re_type;
char re_retries;
char re_resend; /* send flag. 0 == dont resend */
char re_sends;
char re_srch;
int re_sent;
u_long re_sentat;
u_long re_timeout;
struct in_addr re_addr;
struct resinfo re_rinfo;
struct hent re_he;
struct reslist *re_next, *re_prev;
char re_name[65];
char *nick;
char *host;
char *user;
char *channel;
char *command;
int server;
void (*func)();
};
struct hostent *ar_answer(char *, int, void (*func)(struct reslist *) );
void ar_close(void);
int ar_delete(char *, int);
int ar_gethostbyname(char *, char *, int, char *, char *, char *, char *, int, void (*func)(), char *);
int ar_gethostbyaddr(char *, char *, int, char *, char *, char *, char *, int, void (*func)(), char *);
int ar_init(int);
int ar_open(void);
long ar_timeout(time_t, char *, int, void (*func)(struct reslist *) );
void ar_rename_nick(char *, char *, int);
#endif
#ifndef MIN
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#endif
#define getrandom(min, max) ((rand() % (int)(((max)+1) - (min))) + (min))
extern char *auto_str;
#endif

662
include/module.h Normal file
View File

@@ -0,0 +1,662 @@
/*
* Module/dll handling code written by Colten Edwards.
* Copyright 1997
*/
#ifndef _MODULE_H
#define _MODULE_H
/*
* if we change the table below, we change this module number to the
* current date.
*/
#define MODULE_VERSION 011000
#include "struct.h"
typedef int (*Function_ptr)();
#ifdef WANT_DLL
#ifdef HPUX
#include <dl.h>
#endif
#define COMMAND_PROC 0x0001 /* New /command proc return void */
#define ALIAS_PROC 0x0002 /* new $alias proc return new_malloc'd string */
#define CTCP_PROC 0x0004 /* new ctcp proc return new_malloc'd string*/
#define VAR_PROC 0x0008 /* new variable no return */
#define HOOK_PROC 0x0010 /* new numeric proc
* return int 1 if we don't want client
* to also handle this.
* or 0 if we want client to handle
*/
#define RAW_PROC 0x0020 /* new raw irc proc */
#define DCC_PROC 0x0040 /* add to dcc command list */
#define OUTPUT_PROC 0x0080 /* New output proc for all windows. */
#define WINDOW_PROC 0x0100 /* New window proc */
#define TABLE_PROC 0x8000 /* removing a global_table proc */
#define INVALID_MODVERSION -1
typedef int (Irc_PackageInitProc) (IrcCommandDll **, Function_ptr *);
typedef char *(Irc_PackageVersionProc) (IrcCommandDll **);
typedef struct _function_table
{
char *name;
char *desc;
int id;
int flag;
void *func1;
void *func2;
} Function;
typedef struct _package_installed {
struct _package_installed *next;
char *name;
char *version;
int major;
int minor;
int lock;
#if defined(HPUX)
shl_t handle;
#elif defined(__EMX__)
HMODULE handle;
#elif defined(WINNT)
HINSTANCE handle;
#else
void *handle;
#endif
Irc_PackageInitProc *cleanup;
} Packages;
Packages *find_module (char *);
int BX_add_module_proc (unsigned int, char *, char *, char *, int, int, void *, void *);
int remove_package (char *);
int BX_remove_module_proc (unsigned int, char *, char *, char *);
int add_module(unsigned int, Function *, char *);
extern BuiltInDllFunctions *dll_functions;
#ifndef __hook_c
extern NumericFunction *dll_numeric_list;
#endif
extern IrcCommandDll *dll_commands;
extern CtcpEntryDll *dll_ctcp;
extern WindowDll *dll_window;
extern IrcVariableDll *dll_variable;
char *BX_get_dllstring_var(char *);
int BX_get_dllint_var(char *);
void BX_set_dllstring_var(char *, char *);
void BX_set_dllint_var(char *, unsigned int);
RawDll *find_raw_proc(char *, char **);
int check_version(unsigned long);
#endif /* WANT_DLL */
/*
* the order of this enum is extremely important. ie a module compiled
* on a differant order would fail miserably. So when adding to the list
* make sure and add to the end of the list.
*/
enum FUNCTION_VALUE
{
/* ircaux.c */
MODULE_VERSION_CHECK,
/* output.c */
PUT_IT,
BITCHSAY,
YELL,
ADD_TO_LOG,
VSNPRINTF,
SNPRINTF,
NEW_MALLOC,
NEW_FREE,
NEW_REALLOC,
MALLOC_STRCPY,
MALLOC_STRCAT,
MALLOC_STR2CPY,
M_3DUP,
M_OPENDUP,
M_S3CAT,
M_S3CAT_S,
M_3CAT,
UPPER,
LOWER,
STRISTR,
RSTRISTR,
WORD_COUNT,
REMOVE_TRAILING_SPACES,
MY_STRICMP,
MY_STRNICMP,
MY_STRNSTR,
CHOP,
STRMCPY,
STRMCAT,
SCANSTR,
EXPAND_TWIDDLE,
CHECK_NICKNAME,
SINDEX,
RSINDEX,
ISNUMBER,
RFGETS,
PATH_SEARCH,
DOUBLE_QUOTE,
IRCPANIC,
END_STRCMP,
BEEP_EM,
UZFOPEN,
FUNC_GET_TIME,
TIME_DIFF,
TIME_TO_NEXT_MINUTE,
PLURAL,
MY_CTIME,
LTOA,
STRFORMAT,
MATCHINGBRACKET,
PARSE_NUMBER,
SPLITW,
UNSPLITW,
M_2DUP,
M_E3CAT,
CHECK_VAL,
ON_OFF,
STREXTEND,
STRFILL,
EMPTY_FUNC,
REMOVE_BRACKETS,
MY_ATOL,
M_DUPCHAR,
STREQ,
STRIEQ,
STRMOPENCAT,
OV_STRCPY,
STRIP_CONTROL,
FIGURE_OUT_ADDRESS,
STRNRCHR,
MASK_DIGITS,
CCSPAN,
CHARCOUNT,
STRPCAT,
STRCPY_NOCOLORCODES,
CRYPTIT,
STRIPDEV,
MANGLE_LINE,
M_STRDUP,
M_STRCAT_UES,
M_STRNDUP,
MALLOC_SPRINTF,
M_SPRINTF,
NEXT_ARG,
NEW_NEXT_ARG,
NEW_NEW_NEXT_ARG,
LAST_ARG,
NEXT_IN_COMMA_LIST,
RANDOM_NUMBER,
/* words.c */
STRSEARCH,
MOVE_TO_ABS_WORD,
MOVE_WORD_REL,
EXTRACT,
EXTRACT2,
WILD_MATCH,
/* network */
CONNECT_BY_NUMBER,
RESOLV,
LOOKUP_HOST,
LOOKUP_IP,
HOST_TO_IP,
IP_TO_HOST,
ONE_TO_ANOTHER,
SET_BLOCKING,
SET_NON_BLOCKING,
/* list.c */
ADD_TO_LIST,
ADD_TO_LIST_EXT,
REMOVE_FROM_LIST_,
REMOVE_FROM_LIST_EXT,
REMOVEWILD_FROM_LIST,
LIST_LOOKUP,
LIST_LOOKUP_EXT,
FIND_IN_LIST,
FIND_IN_LIST_EXT,
/* alist.c */
ADD_TO_ARRAY,
REMOVE_FROM_ARRAY,
ARRAY_POP,
REMOVE_ALL_FROM_ARRAY,
ARRAY_LOOKUP,
FIND_ARRAY_ITEM,
FIND_FIXED_ARRAY_ITEM,
/* server.c */
SEND_TO_SERVER,
QUEUE_SEND_TO_SERVER,
MY_SEND_TO_SERVER,
/* connecting to the server */
GET_CONNECTED,
CONNECT_TO_SERVER_BY_REFNUM,
CLOSE_SERVER,
IS_SERVER_CONNECTED,
FLUSH_SERVER,
SERVER_IS_CONNECTED,
IS_SERVER_OPEN,
CLOSE_ALL_SERVER,
/* server file reading */
READ_SERVER_FILE,
ADD_TO_SERVER_LIST,
BUILD_SERVER_LIST,
DISPLAY_SERVER_LIST,
CREATE_SERVER_LIST,
PARSE_SERVER_INFO,
SERVER_LIST_SIZE,
/* misc server/nickname functions */
FIND_SERVER_REFNUM,
FIND_IN_SERVER_LIST,
PARSE_SERVER_INDEX,
SET_SERVER_REDIRECT,
GET_SERVER_REDIRECT,
CHECK_SERVER_REDIRECT,
FUDGE_NICKNAME,
RESET_NICKNAME,
/* various set server struct functions */
SET_SERVER_COOKIE,
SET_SERVER_FLAG,
SET_SERVER_MOTD,
SET_SERVER_OPERATOR,
SET_SERVER_ITSNAME,
SET_SERVER_VERSION,
SET_SERVER_LAG,
SET_SERVER_PASSWORD,
SET_SERVER_NICKNAME,
SET_SERVER2_8,
SET_SERVER_AWAY,
/* various get server struct functions */
GET_SERVER_COOKIE,
GET_SERVER_NICKNAME,
GET_SERVER_NAME,
GET_SERVER_ITSNAME,
GET_SERVER_MOTD,
GET_SERVER_OPERATOR,
GET_SERVER_VERSION,
GET_SERVER_FLAG,
GET_POSSIBLE_UMODES,
GET_SERVER_PORT,
GET_SERVER_LAG,
GET_SERVER2_8,
GET_UMODE,
GET_SERVER_AWAY,
GET_SERVER_NETWORK,
GET_PENDING_NICKNAME,
SERVER_DISCONNECT,
GET_SERVER_LIST,
GET_SERVER_CHANNELS,
SET_SERVER_LAST_CTCP_TIME,
GET_SERVER_LAST_CTCP_TIME,
SET_SERVER_TRACE_FLAG,
GET_SERVER_TRACE_FLAG,
GET_SERVER_READ,
GET_SERVER_LINKLOOK,
SET_SERVER_LINKLOOK,
GET_SERVER_LINKLOOK_TIME,
SET_SERVER_LINKLOOK_TIME,
GET_SERVER_TRACE_KILL,
SET_SERVER_TRACE_KILL,
ADD_SERVER_CHANNELS,
SET_SERVER_CHANNELS,
SEND_MSG_TO_CHANNELS,
SEND_MSG_TO_NICKS,
IS_SERVER_QUEUE,
/* glob.c */
BSD_GLOB,
BSD_GLOBFREE,
CONVERT_OUTPUT_FORMAT,
UPDATE_CLOCK,
BREAKARGS,
PASTEARGS,
USERAGE,
SEND_TEXT,
SET_LASTLOG_MSG_LEVEL,
SPLIT_CTCP,
RANDOM_STR,
DCC_PRINTF,
MY_ENCRYPT,
MY_DECRYPT,
PREPARE_COMMAND,
BUILD_STATUS,
FUNC_LOAD,
HOOK,
/* irc.c */
IRC_IO_FUNC,
IRC_EXIT_FUNC,
/* alias.c */
LOCK_STACK_FRAME,
UNLOCK_STACK_FRAME,
/* input.c */
FUNC_UPDATE_INPUT,
CURSOR_TO_INPUT,
SET_INPUT,
GET_INPUT,
SET_INPUT_PROMPT,
GET_INPUT_PROMPT,
ADDTABKEY,
GETTABKEY,
GETNEXTNICK,
GETCHANNICK,
LOOKUP_NICKCOMPLETION,
ADD_COMPLETION_TYPE,
/* module.c */
ADD_MODULE_PROC,
REMOVE_MODULE_PROC,
/* names.c */
IS_CHANOP,
IS_CHANNEL,
MAKE_CHANNEL,
IM_ON_CHANNEL,
IS_ON_CHANNEL,
ADD_CHANNEL,
ADD_TO_CHANNEL,
GET_CHANNEL_KEY,
FUNC_RECREATE_MODE,
FUNC_COMPRESS_MODES,
FUNC_GOT_OPS,
GET_CHANNEL_BANS,
GET_CHANNEL_MODE,
CLEAR_BANS,
REMOVE_CHANNEL,
REMOVE_FROM_CHANNEL,
RENAME_NICK,
GET_CHANNEL_OPER,
GET_CHANNEL_HALFOP,
FETCH_USERHOST,
GET_CHANNEL_VOICE,
CREATE_CHANNEL_LIST,
FLUSH_CHANNEL_STATS,
LOOKUP_CHANNEL,
FIND_NICKLIST_IN_CHANNELLIST,
ADD_NICKLIST_TO_CHANNELLIST,
NEXT_NICKLIST,
NEXT_NAMELIST,
ADD_NAME_TO_GENERICLIST,
FIND_NAME_IN_GENERICLIST,
ADD_WHOWAS_USERHOST_CHANNEL,
FIND_USERHOST_CHANNEL,
NEXT_USERHOST,
SORTED_NICKLIST,
CLEAR_SORTED_NICKLIST,
ADD_NAME_TO_FLOODLIST,
FIND_NAME_IN_FLOODLIST,
CLEAR_WHOWAS_HASH_TABLE,
REMOVE_OLDEST_WHOWAS_HASHLIST,
/* cset.c fset.c vars.c */
FGET_STRING_VAR,
FSET_STRING_VAR,
GET_WSET_STRING_VAR,
SET_WSET_STRING_VAR,
SET_CSET_INT_VAR,
GET_CSET_INT_VAR,
SET_CSET_STR_VAR,
GET_CSET_STR_VAR,
GET_DLLINT_VAR,
SET_DLLINT_VAR,
GET_DLLSTRING_VAR,
SET_DLLSTRING_VAR,
GET_INT_VAR,
SET_INT_VAR,
GET_STRING_VAR,
SET_STRING_VAR,
ADD_TIMER,
DELETE_TIMER,
DELETE_ALL_TIMERS,
/* sockets from misc.c */
ADD_SOCKETREAD,
ADD_SOCKETTIMEOUT,
CLOSE_SOCKETREAD,
GET_SOCKET,
SET_SOCKETFLAGS,
GET_SOCKETFLAGS,
GET_SOCKETINFO,
SET_SOCKETINFO,
SET_SOCKETWRITE,
CHECK_SOCKET,
READ_SOCKETS,
WRITE_SOCKETS,
GET_MAX_FD,
NEW_CLOSE,
NEW_OPEN,
DGETS,
/* screen.c */
PREPARE_DISPLAY,
ADD_TO_WINDOW,
SKIP_INCOMING_MIRC,
ADD_TO_SCREEN,
SPLIT_UP_LINE,
OUTPUT_LINE,
OUTPUT_WITH_COUNT,
SCROLL_WINDOW,
CURSOR_NOT_IN_DISPLAY,
CURSOR_IN_DISPLAY,
IS_CURSOR_IN_DISPLAY,
REPAINT_WINDOW,
CREATE_NEW_SCREEN,
CREATE_ADDITIONAL_SCREEN,
KILL_SCREEN,
XTERM_SETTITLE,
ADD_WAIT_PROMPT,
SKIP_CTL_C_SEQ,
STRIP_ANSI,
/* window.c */
FREE_FORMATS,
REMOVE_WINDOW_FROM_SCREEN,
SET_SCREENS_CURRENT_WINDOW,
NEW_WINDOW,
DELETE_WINDOW,
TRAVERSE_ALL_WINDOWS,
ADD_TO_INVISIBLE_LIST,
ADD_TO_WINDOW_LIST,
RECALCULATE_WINDOW_POSITIONS,
MOVE_WINDOW,
RESIZE_WINDOW,
REDRAW_ALL_WINDOWS,
REBALANCE_WINDOWS,
RECALCULATE_WINDOWS,
UPDATE_ALL_WINDOWS,
GOTO_WINDOW,
HIDE_BX_WINDOW,
FUNC_SWAP_LAST_WINDOW,
FUNC_SWAP_NEXT_WINDOW,
FUNC_SWAP_PREVIOUS_WINDOW,
SHOW_WINDOW,
GET_STATUS_BY_REFNUM,
GET_WINDOW_BY_DESC,
GET_WINDOW_BY_REFNUM,
GET_VISIBLE_BY_REFNUM,
GET_WINDOW_BY_NAME,
FUNC_NEXT_WINDOW,
FUNC_PREVIOUS_WINDOW,
UPDATE_WINDOW_STATUS,
UPDATE_ALL_STATUS,
UPDATE_WINDOW_STATUS_ALL,
STATUS_UPDATE,
SET_PROMPT_BY_REFNUM,
GET_PROMPT_BY_REFNUM,
QUERY_NICK, /* DEFUNCT */
QUERY_HOST, /* DEFUNCT */
QUERY_CMD, /* DEFUNCT */
GET_TARGET_BY_REFNUM,
GET_TARGET_CMD_BY_REFNUM,
GET_WINDOW_TARGET_BY_DESC,
IS_CURRENT_CHANNEL,
SET_CURRENT_CHANNEL_BY_REFNUM,
GET_CURRENT_CHANNEL_BY_REFNUM,
GET_REFNUM_BY_WINDOW,
IS_BOUND_TO_WINDOW,
GET_WINDOW_BOUND_CHANNEL,
IS_BOUND_ANYWHERE,
IS_BOUND,
UNBIND_CHANNEL,
GET_BOUND_CHANNEL,
GET_WINDOW_SERVER,
SET_WINDOW_SERVER,
WINDOW_CHECK_SERVERS,
CHANGE_WINDOW_SERVER,
SET_LEVEL_BY_REFNUM,
SET_SERVER_STAT_FLAG,
GET_SERVER_STAT_FLAG,
MESSAGE_TO,
CLEAR_WINDOW,
CLEAR_ALL_WINDOWS,
CLEAR_WINDOW_BY_REFNUM,
UNCLEAR_WINDOW_BY_REFNUM,
SET_SCROLL_LINES,
SET_CONTINUED_LINES,
CURRENT_REFNUM,
NUMBER_OF_WINDOWS_ON_SCREEN,
SET_SCROLLBACK_SIZE,
IS_WINDOW_NAME_UNIQUE,
GET_NICKLIST_BY_WINDOW,
SCROLLBACK_BACKWARDS_LINES,
SCROLLBACK_FORWARDS_LINES,
SCROLLBACK_FORWARDS,
SCROLLBACK_BACKWARDS,
SCROLLBACK_END,
SCROLLBACK_START,
SET_HOLD_MODE,
UNHOLD_WINDOWS,
FUNC_UNSTOP_ALL_WINDOWS,
RESET_LINE_CNT,
FUNC_TOGGLE_STOP_SCREEN,
FLUSH_EVERYTHING_BEING_HELD,
UNHOLD_A_WINDOW,
RECALCULATE_WINDOW_CURSOR,
MAKE_WINDOW_CURRENT,
CLEAR_SCROLLBACK,
SET_DISPLAY_TARGET,
RESET_DISPLAY_TARGET,
RESTORE_DISPLAY_TARGET,
SAVE_DISPLAY_TARGET,
IS_OTHER_FLOOD,
CHECK_FLOODING,
FLOOD_PROT,
/* expr.c */
NEXT_UNIT,
EXPAND_ALIAS,
PARSE_INLINE,
ALIAS_SPECIAL_CHAR,
PARSE_LINE,
PARSE_COMMAND_FUNC,
MAKE_LOCAL_STACK,
DESTROY_LOCAL_STACK,
/* dcc.c */
DCC_CREATE_FUNC,
FIND_DCC_FUNC,
ERASE_DCC_INFO,
ADD_DCC_BIND,
REMOVE_DCC_BIND,
REMOVE_ALL_DCC_BINDS,
GET_ACTIVE_COUNT,
GET_NUM_QUEUE,
ADD_TO_QUEUE,
DCC_FILESEND,
DCC_RESEND,
/* who.c */
WHOBASE,
ISONBASE,
USERHOSTBASE,
FIND_COMMAND_FUNC,
NICKNAME,
IRC_VERSION,
FROM_SERVER,
CONNECTED_TO_SERVER,
PRIMARY_SERVER,
PARSING_SERVER_INDEX,
NOW,
START_TIME,
IDLE_TIME,
LOADING_GLOBAL,
TARGET_WINDOW,
CURRENT_WINDOW,
INVISIBLE_LIST,
MAIN_SCREEN,
LAST_INPUT_SCREEN,
OUTPUT_SCREEN,
SCREEN_LIST,
IRCLOG_FP,
DOING_NOTICE,
LAST_SENT_MSG_BODY, /* NO LONGER USED */
SENT_NICK, /* NO LONGER USED */
DLL_FUNCTIONS,
DLL_NUMERIC,
DLL_COMMANDS,
DLL_VARIABLE,
DLL_CTCP,
DLL_WINDOW,
WINDOW_DISPLAY,
STATUS_UPDATE_FLAG,
TABKEY_ARRAY,
AUTOREPLY_ARRAY,
IDENTD_SOCKET,
VAR_TCL_INTERP,
LASTCLICKLINEDATA,
CONTEXTX,
CONTEXTY,
GUIIPC,
GUI_MUTEX_LOCK,
GUI_MUTEX_UNLOCK,
/* input output functions */
SERV_OPEN_FUNC,
SERV_INPUT_FUNC,
SERV_OUTPUT_FUNC,
SERV_CLOSE_FUNC,
CHECK_EXT_MAIL_STATUS,
CHECK_EXT_MAIL,
DEFAULT_OUTPUT_FUNCTION,
DEFAULT_STATUS_OUTPUT_FUNCTION,
/* names.c */
IS_HALFOP,
/* leave at the end */
NUMBER_OF_GLOBAL_FUNCTIONS
};
extern Function_ptr global_table[];
extern IrcCommand irc_command[];
#endif

715
include/modval.h Normal file
View File

@@ -0,0 +1,715 @@
#ifndef _MODVAL_
/* include this so we have the enum table just in case someone forgets. */
#include "module.h"
/*
* this is a method first used in eggdrop modules..
* A global table of functions is passed into the init function of module,
* which is then assigned to the value global. This table is then indexed,
* to access the various functions. What this means to us, is that we no
* longer require -rdynamic on the LDFLAGS line, which reduces the size
* of the client. This also makes this less compiler/environment dependant,
* allowing modules to work on more platforms.
* A Function_ptr *global is required in the module. The second arg to
* the init function is used to initialize this table. The table itself is
* initialized in modules.c. This file should only be included once in the
* module and also should be the last file included. It should never be
* included in the source itself.
* As long as we add new functions to the END of the list in module.h then
* currently compiled modules will continue to function fine. If we change
* the order of the list however, then BAD things will occur.
* Copyright Colten Edwards July 1998.
*/
#define _MODVAL_
#ifndef BUILT_IN_DLL
#define BUILT_IN_DLL(x) \
void x (IrcCommandDll *intp, char *command, char *args, char *subargs, char *helparg)
#endif
#if defined(WTERM_C) || defined(STERM_C)
/* If we are building wserv or scr-bx we can't use
* the global table so we forward to the actual
* functions instead of throught the global table.
*/
#define set_non_blocking(x) BX_set_non_blocking(x)
#define set_blocking(x) BX_set_blocking(x)
#define ip_to_host(x) BX_ip_to_host(x)
#define host_to_ip(x) BX_host_to_ip(x)
#define connect_by_number(a, b, c, d, e) BX_connect_by_number(a, b, c, d, e)
#ifndef __vars_h_
enum VAR_TYPES { unused };
#endif
int get_int_var (enum VAR_TYPES);
void ircpanic (char *, ...);
char *my_ltoa (long);
#else
/*
* need to undefine these particular defines. Otherwise we can't include
* them in the table.
*/
#undef new_malloc
#undef new_free
#undef RESIZE
#undef malloc_strcat
#undef malloc_strcpy
#undef m_strdup
#undef m_strcat_ues
#undef m_strndup
#undef MODULENAME
#ifdef MAIN_SOURCE
void init_global_functions(void);
#ifndef __modules_c
extern char *_modname_;
extern Function_ptr *global;
#endif
#else
#ifdef INIT_MODULE
/* only in the first c file do we #define INIT_MODULE */
char *_modname_ = NULL;
Function_ptr *global = NULL;
#undef INIT_MODULE
#else
extern char *_modname_;
extern Function_ptr *global;
#endif
#endif /* MAIN_SOURCE */
#define MODULENAME _modname_
#define check_module_version (*(int (*)(unsigned long))global[MODULE_VERSION_CHECK])
#define set_dll_name(x) malloc_strcpy(&_modname_, x)
#define set_global_func(x) global = x;
#define initialize_module(x) { \
global = global_table; \
malloc_strcpy(&_modname_, x); \
if (!check_module_version(MODULE_VERSION)) \
return INVALID_MODVERSION; \
}
#ifndef MAIN_SOURCE
#define empty_string ""
#define space " "
#endif
#ifndef HAVE_VSNPRINTF
#define vsnprintf ((char * (*)())global[VSNPRINTF])
#endif
#ifndef HAVE_SNPRINTF
#define snprintf ((char * (*)())global[SNPRINTF])
#endif
/* Changed these to cast the function pointer rather than the arguments and result. The old method wasn't portable to
* some 64 bit platforms. Next step - change instances of global[XYZ] to &xyzfunc in the code.
*
* Should also think about standardising types (eg Screen instead of struct ScreenStru, get rid of u_char).
*/
/* ircaux.c */
#define new_malloc(x) ((void * (*)(size_t, const char *, const char *, int))global[NEW_MALLOC])((x),MODULENAME, __FILE__,__LINE__)
#define new_free(x) (*(x) = ((void * (*)(void *, const char *, const char *, int))global[NEW_FREE])(*(x),MODULENAME, __FILE__,__LINE__))
#define RESIZE(x, y, z) ((x) = ((void * (*)(void *, size_t, const char *, const char *, int))global[NEW_REALLOC])((x), sizeof(y) * (z), MODULENAME, __FILE__, __LINE__))
#define malloc_strcpy(x, y) ((char * (*)(char **, const char *, const char *, const char *, int))global[MALLOC_STRCPY])((x), (y), MODULENAME, __FILE__, __LINE__)
#define malloc_strcat(x, y) ((char * (*)(char **, const char *, const char *, const char *, int))global[MALLOC_STRCAT])((x), (y), MODULENAME, __FILE__, __LINE__)
#define malloc_str2cpy (*(char * (*)(char **, const char *, const char *))global[MALLOC_STR2CPY])
#define m_3dup (*(char * (*)(const char *, const char *, const char *))global[M_3DUP])
#define m_opendup (*(char * (*)(const char *, ...))global[M_OPENDUP])
#define m_s3cat (*(char * (*)(char **, const char *, const char *))global[M_S3CAT])
#define m_s3cat_s (*(char * (*)(char **, const char *, const char *))global[M_S3CAT_S])
#define m_3cat (*(char * (*)(char **, const char *, const char *))global[M_3CAT])
#define m_2dup (*(char * (*)(const char *, const char *))global[M_2DUP])
#define m_e3cat (*(char * (*)(char **, const char *, const char *))global[M_E3CAT])
#define my_stricmp (*(int (*)(const char *, const char *))global[MY_STRICMP])
#define my_strnicmp (*(int (*)(const char *, const char *, size_t))global[MY_STRNICMP])
#define my_strnstr (*(int (*)(const unsigned char *, const unsigned char *, size_t))global[MY_STRNSTR])
#define chop (*(char * (*)(char *, int))global[CHOP])
#define strmcpy (*(char * (*)(char *, const char *, int))global[STRMCPY])
#define strmcat (*(char * (*)(char *, const char *, int))global[STRMCAT])
#define scanstr (*(int (*)(char *, char *))global[SCANSTR])
#define m_dupchar (*(char * (*)(int))global[M_DUPCHAR])
#define streq (*(size_t (*)(const char *, const char *))global[STREQ])
#define strieq (*(size_t (*)(const char *, const char *))global[STRIEQ])
#define strmopencat (*(char * (*)(char *, int , ...))global[STRMOPENCAT])
#define ov_strcpy (*(char * (*)(char *, const char *))global[OV_STRCPY])
#define upper (*(char * (*)(char *))global[UPPER])
#define lower (*(char * (*)(char *))global[LOWER])
#define stristr (*(char * (*)(const char *, const char *))global[STRISTR])
#define rstristr (*(char * (*)(char *, char *))global[RSTRISTR])
#define word_count (*(int (*)(char *))global[WORD_COUNT])
#define remove_trailing_spaces (*(char * (*)(char *))global[REMOVE_TRAILING_SPACES])
#define expand_twiddle (*(char * (*)(char *))global[EXPAND_TWIDDLE])
#define check_nickname (*(char * (*)(char *))global[CHECK_NICKNAME])
#define sindex (*(char * (*)(char *, char *))global[SINDEX])
#define rsindex (*(char * (*)(char *, char *, char *, int))global[RSINDEX])
#define is_number (*(int (*)(const char *))global[ISNUMBER])
#define rfgets (*(char * (*)(char *, int , FILE *))global[RFGETS])
#define path_search (*(char * (*)(char *, char *))global[PATH_SEARCH])
#define double_quote (*(char * (*)(const char *, const char *, char *))global[DOUBLE_QUOTE])
#define ircpanic (*(void (*)(char *, ...))global[IRCPANIC])
#define end_strcmp (*(int (*)(const char *, const char *, int))global[END_STRCMP])
#define beep_em (*(void (*)(int))global[BEEP_EM])
#define uzfopen (*(FILE * (*)(char **, char *, int))global[UZFOPEN])
#define get_time (*(struct timeval (*)(struct timeval *))global[FUNC_GET_TIME])
#define time_diff (*(double (*)(struct timeval , struct timeval))global[TIME_DIFF])
#define time_to_next_minute (*(int (*)(void))global[TIME_TO_NEXT_MINUTE])
#define plural (*(char * (*)(int))global[PLURAL])
#define my_ctime (*(char * (*)(time_t))global[MY_CTIME])
#define ccspan (*(size_t (*)(const char *, int))global[CCSPAN])
/* If we are in a module, undefine the previous define from ltoa to my_ltoa */
#ifdef ltoa
#undef ltoa
#endif
#define ltoa (*(char *(*)(long ))global[LTOA])
#define strformat (*(char *(*)(char *, const char *, int , char ))global[STRFORMAT])
#define MatchingBracket (*(char *(*)(char *, char , char ))global[MATCHINGBRACKET])
#define parse_number (*(int (*)(char **))global[PARSE_NUMBER])
#define splitw (*(int (*)(char *, char ***))global[SPLITW])
#define unsplitw (*(char *(*)(char ***, int ))global[UNSPLITW])
#define check_val (*(int (*)(char *))global[CHECK_VAL])
#define on_off (*(char *(*)(int ))global[ON_OFF])
#define strextend (*(char *(*)(char *, char , int ))global[STREXTEND])
#define strfill (*(const char *(*)(char , int ))global[STRFILL])
#define empty (*(int (*)(const char *))global[EMPTY_FUNC])
#define remove_brackets (*(char *(*)(const char *, const char *, int *))global[REMOVE_BRACKETS])
#define my_atol (*(long (*)(const char *))global[MY_ATOL])
#define strip_control (*(void (*)(const char *, char *))global[STRIP_CONTROL])
#define figure_out_address (*(int (*)(char *, char **, char **, char **, char **, int *))global[FIGURE_OUT_ADDRESS])
#define strnrchr (*(char *(*)(char *, char , int ))global[STRNRCHR])
#define mask_digits (*(void (*)(char **))global[MASK_DIGITS])
#define ccscpan (*(size_t (*)(const char *, int))global[CCSPAN])
#define charcount (*(int (*)(const char *, char ))global[CHARCOUNT])
#define strpcat (*(char *(*)(char *, const char *, ...))global[STRPCAT])
#define strcpy_nocolorcodes (*(u_char *(*)(u_char *, const u_char *))global[STRCPY_NOCOLORCODES])
#define cryptit (*(char *(*)(const char *))global[CRYPTIT])
#define stripdev (*(char *(*)(char *))global[STRIPDEV])
#define mangle_line (*(size_t (*)(char *, int, size_t))global[MANGLE_LINE])
#define m_strdup(x) (*(char *(*)(const char *, const char *, const char *, const int ))global[M_STRDUP])((x), MODULENAME, __FILE__, __LINE__)
#define m_strcat_ues(x, y, z) (*(char *(*)(char **, char *, int , const char *, const char *, const int ))global[M_STRCAT_UES])((x), (y), (z), MODULENAME, __FILE__, __LINE__)
#define m_strndup(x, y) (*(char *(*)(const char *, size_t, const char *, const char *, const int ))global[M_STRNDUP])((x), (y), MODULENAME, __FILE__, __LINE__)
#define malloc_sprintf (*(char *(*)(char **, const char *, ...))global[MALLOC_SPRINTF])
#define m_sprintf (*(char *(*)(const char *, ...))global[M_SPRINTF])
#define next_arg (*(char *(*)(char *, char **))global[NEXT_ARG])
#define new_next_arg (*(char *(*)(char *, char **))global[NEW_NEXT_ARG])
#define new_new_next_arg (*(char *(*)(char *, char **, char *))global[NEW_NEW_NEXT_ARG])
#define last_arg (*(char *(*)(char **))global[LAST_ARG])
#define next_in_comma_list (*(char *(*)(char *, char **))global[NEXT_IN_COMMA_LIST])
#define random_number (*(u_long (*)(u_long))global[RANDOM_NUMBER])
/* words.c reg.c */
#define strsearch (*(char *(*)(char *, char *, char *, int ))global[STRSEARCH])
#define move_to_abs_word (*(char *(*)(const char *, char **, int ))global[MOVE_TO_ABS_WORD])
#define move_word_rel (*(char *(*)(const char *, char **, int ))global[MOVE_WORD_REL])
#define extract (*(char *(*)(char *, int , int ))global[EXTRACT])
#define extract2 (*(char *(*)(const char *, int , int ))global[EXTRACT2])
#define wild_match (*(int (*)(const char *, const char *))global[WILD_MATCH])
/* network.c */
#define connect_by_number (*(int (*)(char *, unsigned short *, int , int , int ))global[CONNECT_BY_NUMBER])
#define lookup_host (*(struct sockaddr_foobar *(*)(const char *))global[LOOKUP_HOST])
#define resolv (*(struct sockaddr_foobar *(*)(const char *))global[LOOKUP_HOST])
#define host_to_ip (*(char *(*)(const char *))global[HOST_TO_IP])
#define ip_to_host (*(char *(*)(const char *))global[IP_TO_HOST])
#define one_to_another (*(char *(*)(const char *))global[ONE_TO_ANOTHER])
#define set_blocking (*(int (*)(int ))global[SET_BLOCKING])
#define set_non_blocking (*(int (*)(int ))global[SET_NON_BLOCKING])
/* list.c */
#define add_to_list (*(void (*)(List **, List *))global[ADD_TO_LIST])
#define add_to_list_ext (*(void (*)(List **, List *, int (*)(List *, List *)))global[ADD_TO_LIST_EXT])
#define find_in_list (*(List *(*)(List **, char *, int))global[FIND_IN_LIST])
#define find_in_list_ext (*(List *(*)(List **, char *, int, int (*)(List *, char *)))global[FIND_IN_LIST_EXT])
#define remove_from_list (*(List *(*)(List **, char *))global[REMOVE_FROM_LIST_])
#define remove_from_list_ext (*(List *(*)(List **, char *, int (*)(List *, char *)))global[REMOVE_FROM_LIST_EXT])
#define removewild_from_list (*(List *(*)(List **, char *))global[REMOVEWILD_FROM_LIST])
#define list_lookup (*(List *(*)(List **, char *, int, int))global[LIST_LOOKUP])
#define list_lookup_ext (*(List *(*)(List **, char *, int, int, int (*)(List *, char *)))global[LIST_LOOKUP_EXT])
/* alist.c */
#define add_to_array (*(Array_item *(*)(Array *, Array_item *))global[ADD_TO_ARRAY])
#define remove_from_array (*(Array_item *(*)(Array *, char *))global[REMOVE_FROM_ARRAY])
#define array_pop (*(Array_item *(*)(Array *, int))global[ARRAY_POP])
#define remove_all_from_array (*(Array_item *(*)(Array *, char *))global[REMOVE_ALL_FROM_ARRAY])
#define array_lookup (*(Array_item *(*)(Array *, char *, int, int ))global[ARRAY_LOOKUP])
#define find_array_item (*(Array_item *(*)(Array *, char *, int *, int *))global[FIND_ARRAY_ITEM])
#define find_fixed_array_item (*(void *(*)(void *, size_t, int, char *, int *, int *))global[FIND_FIXED_ARRAY_ITEM])
/* output.c */
#define put_it (*(void (*)(const char *, ...))global[PUT_IT])
#define bitchsay (*(void (*)(const char *, ...))global[BITCHSAY])
#define yell (*(void (*)(const char *, ...))global[YELL])
#define add_to_screen (*(void (*)(unsigned char *))global[ADD_TO_SCREEN])
#define add_to_log (*(void (*)(FILE *, time_t, const char *, int ))global[ADD_TO_LOG])
#define bsd_glob (*(int (*)(const char *, int, int (*)(const char *, int), glob_t *))global[BSD_GLOB])
#define bsd_globfree (*(void (*)(glob_t *))global[BSD_GLOBFREE])
/* misc commands */
#define my_encrypt (*(void (*)(char *, int , char *))global[MY_ENCRYPT])
#define my_decrypt (*(void (*)(char *, int , char *))global[MY_DECRYPT])
#define prepare_command (*(ChannelList *(*)(int *, char *, int))global[PREPARE_COMMAND])
#define convert_output_format (*(char *(*)(const char *, const char *, ...))global[CONVERT_OUTPUT_FORMAT])
#define userage (*(void (*)(char *, char *))global[USERAGE])
#define send_text (*(void (*)(const char *, const char *, char *, int , int ))global[SEND_TEXT])
/* this needs to be worked out. it's passed in the IrcVariable * to _Init */
#define load (*(void (*)(char *, char *, char *, char *))global[FUNC_LOAD])
#define update_clock (*(char *(*)(int ))global[UPDATE_CLOCK])
#define PasteArgs (*(char *(*)(char **, int ))global[PASTEARGS])
#define BreakArgs (*(int (*)(char *, char **, char **, int ))global[BREAKARGS])
#define set_lastlog_msg_level (*(unsigned long (*)(unsigned long ))global[SET_LASTLOG_MSG_LEVEL])
#define split_CTCP (*(void (*)(char *, char *, char *))global[SPLIT_CTCP])
#define random_str (*(char *(*)(int , int ))global[RANDOM_STR])
#define dcc_printf (*(int (*)(int, char *, ...))global[DCC_PRINTF])
/* screen.c */
#define prepare_display (*(unsigned char **(*)(const unsigned char *, int , int *, int ))global[PREPARE_DISPLAY])
#define add_to_window (*(void (*)(Window *, const unsigned char *))global[ADD_TO_WINDOW])
#define skip_incoming_mirc (*(unsigned char *(*)(unsigned char *))global[SKIP_INCOMING_MIRC])
#define add_to_screen (*(void (*)(unsigned char *))global[ADD_TO_SCREEN])
#define split_up_line (*(unsigned char **(*)(const unsigned char *, int ))global[SPLIT_UP_LINE])
#define output_line (*(int (*)(const unsigned char *))global[OUTPUT_LINE])
#define output_with_count (*(int (*)(const unsigned char *, int , int ))global[OUTPUT_WITH_COUNT])
#define scroll_window (*(void (*)(Window *))global[SCROLL_WINDOW])
/* Previous broken definitions - yet it still seemed to work?
#define cursor_not_in_display(x) ((void) (global[CURSOR_IN_DISPLAY]((Screen *)x)))
#define cursor_in_display(x) ((void) (global[CURSOR_IN_DISPLAY]((Screen *)x)))
*/
#define cursor_not_in_display (*(void (*)(Screen *))global[CURSOR_NOT_IN_DISPLAY])
#define cursor_in_display (*(void (*)(Window *))global[CURSOR_IN_DISPLAY])
#define is_cursor_in_display (*(int (*)(Screen *))global[IS_CURSOR_IN_DISPLAY])
#define repaint_window (*(void (*)(Window *, int, int))global[REPAINT_WINDOW])
#define kill_screen (*(void (*)(Screen *))global[KILL_SCREEN])
#define xterm_settitle (*(void (*)(void))global[XTERM_SETTITLE])
#define add_wait_prompt (*(void (*)(char *, void (*)(char *, char *), char *, int , int ))global[ADD_WAIT_PROMPT])
#define skip_ctl_c_seq (*(const unsigned char *(*)(const unsigned char *, int *, int *, int ))global[SKIP_CTL_C_SEQ])
#define strip_ansi (*(unsigned char *(*)(const unsigned char *))global[STRIP_ANSI])
#define create_new_screen ((Screen * (*)(void))global[CREATE_NEW_SCREEN])
#define create_additional_screen ((Window * (*)(void))global[CREATE_ADDITIONAL_SCREEN])
/* window.c */
#define free_formats (*(void (*)(Window *))global[FREE_FORMATS])
#define set_screens_current_window (*(void (*)(Screen *, Window *))global[SET_SCREENS_CURRENT_WINDOW])
#define new_window (*(Window *(*)(struct ScreenStru *))global[NEW_WINDOW])
#define delete_window (*(void (*)(Window *))global[DELETE_WINDOW])
#define traverse_all_windows (*(int (*)(Window **))global[TRAVERSE_ALL_WINDOWS])
#define add_to_invisible_list (*(void (*)(Window *))global[ADD_TO_INVISIBLE_LIST])
#define remove_window_from_screen (*(void (*)(Window *))global[REMOVE_WINDOW_FROM_SCREEN])
#define recalculate_window_positions (*(void (*)(struct ScreenStru *))global[RECALCULATE_WINDOW_POSITIONS])
#define move_window (*(void (*)(Window *, int))global[MOVE_WINDOW])
#define resize_window (*(void (*)(int, Window *, int))global[RESIZE_WINDOW])
#define redraw_all_windows (*(void (*)(void))global[REDRAW_ALL_WINDOWS])
#define rebalance_windows (*(void (*)(struct ScreenStru *))global[REBALANCE_WINDOWS])
#define recalculate_windows (*(void (*)(struct ScreenStru *))global[RECALCULATE_WINDOWS])
#define update_all_windows (*(void (*)(void))global[UPDATE_ALL_WINDOWS])
/* Several of these are never used! */
#define goto_window (*(void (*)(Screen *, int))global[GOTO_WINDOW])
#define hide_window (*(void (*)(Window *))global[HIDE_BX_WINDOW])
#define swap_last_window (*(void (*)(char , char *))global[FUNC_SWAP_LAST_WINDOW])
#define swap_next_window (*(void (*)(char , char *))global[FUNC_SWAP_NEXT_WINDOW])
#define swap_previous_window (*(void (*)(char , char *))global[FUNC_SWAP_PREVIOUS_WINDOW])
#define show_window (*(void (*)(Window *))global[SHOW_WINDOW])
#define get_status_by_refnum (*(char *(*)(unsigned , unsigned ))global[GET_STATUS_BY_REFNUM])
#define get_visible_by_refnum (*(int (*)(char *))global[GET_VISIBLE_BY_REFNUM])
#define get_window_by_desc (*(Window *(*)(const char *))global[GET_WINDOW_BY_DESC])
#define get_window_by_refnum (*(Window *(*)(unsigned ))global[GET_WINDOW_BY_REFNUM])
#define get_window_by_name (*(Window *(*)(const char *))global[GET_WINDOW_BY_NAME])
#define next_window (*(void (*)(char , char *))global[FUNC_NEXT_WINDOW])
#define previous_window (*(void (*)(char , char *))global[FUNC_PREVIOUS_WINDOW])
#define update_window_status (*(void (*)(Window *, int ))global[UPDATE_WINDOW_STATUS])
#define update_all_status (*(void (*)(Window *, char *, int))global[UPDATE_ALL_STATUS])
#define update_window_status_all (*(void (*)(void ))global[UPDATE_WINDOW_STATUS_ALL])
#define status_update (*(int (*)(int ))global[STATUS_UPDATE])
#define set_prompt_by_refnum (*(void (*)(unsigned , char *))global[SET_PROMPT_BY_REFNUM])
#define get_prompt_by_refnum (*(char *(*)(unsigned ))global[GET_PROMPT_BY_REFNUM])
#define get_target_by_refnum (*(char *(*)(unsigned ))global[GET_TARGET_BY_REFNUM])
#define get_target_cmd_by_refnum (*(char *(*)(u_int))global[GET_TARGET_CMD_BY_REFNUM])
#define get_window_target_by_desc (*(Window *(*)(char *))global[GET_WINDOW_TARGET_BY_DESC])
#define is_current_channel (*(int (*)(char *, int , int ))global[IS_CURRENT_CHANNEL])
#define set_current_channel_by_refnum (*(const char *(*)(unsigned , char *))global[SET_CURRENT_CHANNEL_BY_REFNUM])
#define get_current_channel_by_refnum (*(char *(*)(unsigned ))global[GET_CURRENT_CHANNEL_BY_REFNUM])
#define get_refnum_by_window (*(char *(*)(const Window *))global[GET_REFNUM_BY_WINDOW])
#define is_bound_to_window (*(int (*)(const Window *, const char *))global[IS_BOUND_TO_WINDOW])
#define get_window_bound_channel (*(Window *(*)(const char *))global[GET_WINDOW_BOUND_CHANNEL])
#define is_bound_anywhere (*(int (*)(const char *))global[IS_BOUND_ANYWHERE])
#define is_bound (*(int (*)(const char *, int ))global[IS_BOUND])
#define unbind_channel (*(void (*)(const char *, int ))global[UNBIND_CHANNEL])
#define get_bound_channel (*(char *(*)(Window *))global[GET_BOUND_CHANNEL])
#define get_window_server (*(int (*)(unsigned ))global[GET_WINDOW_SERVER])
#define set_window_server (*(void (*)(int , int , int ))global[SET_WINDOW_SERVER])
#define window_check_servers (*(void (*)(int ))global[WINDOW_CHECK_SERVERS])
#define change_window_server (*(void (*)(int , int ))global[CHANGE_WINDOW_SERVER])
#define set_level_by_refnum (*(void (*)(unsigned , unsigned long ))global[SET_LEVEL_BY_REFNUM])
#define message_to (*(void (*)(unsigned long ))global[MESSAGE_TO])
#define clear_window (*(void (*)(Window *))global[CLEAR_WINDOW])
#define clear_all_windows (*(void (*)(int , int ))global[CLEAR_ALL_WINDOWS])
#define clear_window_by_refnum (*(void (*)(unsigned ))global[CLEAR_WINDOW_BY_REFNUM])
#define unclear_window_by_refnum (*(void (*)(unsigned ))global[UNCLEAR_WINDOW_BY_REFNUM])
#define set_scroll_lines (*(void (*)(Window *, char *, int))global[SET_SCROLL_LINES])
#define set_continued_lines (*(void (*)(Window *, char *, int))global[SET_CONTINUED_LINES])
#define current_refnum (*(unsigned (*)(void ))global[CURRENT_REFNUM])
#define number_of_windows_on_screen (*(int (*)(Window *))global[NUMBER_OF_WINDOWS_ON_SCREEN])
#define set_scrollback_size (*(void (*)(Window *, char *, int))global[SET_SCROLLBACK_SIZE])
#define is_window_name_unique (*(int (*)(char *))global[IS_WINDOW_NAME_UNIQUE])
#define get_nicklist_by_window (*(char *(*)(Window *))global[GET_NICKLIST_BY_WINDOW])
#define scrollback_backwards_lines (*(void (*)(int ))global[SCROLLBACK_BACKWARDS_LINES])
#define scrollback_forwards_lines (*(void (*)(int ))global[SCROLLBACK_FORWARDS_LINES])
#define scrollback_forwards (*(void (*)(char , char *))global[SCROLLBACK_FORWARDS])
#define scrollback_backwards (*(void (*)(char , char *))global[SCROLLBACK_BACKWARDS])
#define scrollback_end (*(void (*)(char , char *))global[SCROLLBACK_END])
#define scrollback_start (*(void (*)(char , char *))global[SCROLLBACK_START])
#define set_hold_mode (*(void (*)(Window *, int, int))global[SET_HOLD_MODE])
#define unhold_windows (*(int (*)(void ))global[UNHOLD_WINDOWS])
#define unstop_all_windows (*(void (*)(char , char *))global[FUNC_UNSTOP_ALL_WINDOWS])
#define reset_line_cnt (*(void (*)(Window *, char *, int))global[RESET_LINE_CNT])
#define toggle_stop_screen (*(void (*)(char , char *))global[FUNC_TOGGLE_STOP_SCREEN])
#define flush_everything_being_held (*(void (*)(Window *))global[FLUSH_EVERYTHING_BEING_HELD])
#define unhold_a_window (*(int (*)(Window *))global[UNHOLD_A_WINDOW])
#define recalculate_window_cursor (*(void (*)(Window *))global[RECALCULATE_WINDOW_CURSOR])
#define make_window_current (*(void (*)(Window *))global[MAKE_WINDOW_CURRENT])
#define clear_scrollback (*(void (*)(Window *))global[CLEAR_SCROLLBACK])
#define set_display_target (*(void (*)(const char *, unsigned long ))global[SET_DISPLAY_TARGET])
#define save_display_target (*(void (*)(const char **, unsigned long *))global[SAVE_DISPLAY_TARGET])
#define restore_display_target (*(void (*)(const char *, unsigned long ))global[RESTORE_DISPLAY_TARGET])
#define reset_display_target (*(void (*)(void ))global[RESET_DISPLAY_TARGET])
#define build_status (*(void (*)(Window *, char *, int))global[BUILD_STATUS])
#define do_hook (*(int (*)(int, char *, ...))global[HOOK])
/* input.c */
#define update_input (*(void (*)(int ))global[FUNC_UPDATE_INPUT])
#define cursor_to_input (*(void (*)(void ))global[CURSOR_TO_INPUT])
#define set_input (*(void (*)(char *))global[SET_INPUT])
#define get_input (*(char *(*)(void ))global[GET_INPUT])
#define get_input_prompt (*(char *(*)(void ))global[GET_INPUT_PROMPT])
#define set_input_prompt (*(void (*)(Window *, char *, int))global[SET_INPUT_PROMPT])
#define addtabkey (*(void (*)(char *, char *, int ))global[ADDTABKEY])
#define gettabkey (*(NickTab *(*)(int, int, char *))global[GETTABKEY])
#define getnextnick (*(NickTab *(*)(int, char *, char *, char *))global[GETNEXTNICK])
#define getchannick (*(char *(*)(char *, char *))global[GETCHANNICK])
#define lookup_nickcompletion (*(NickList *(*)(ChannelList *, char *))global[LOOKUP_NICKCOMPLETION])
#define add_completion_type (*(int (*)(char *, int , enum completion ))global[ADD_COMPLETION_TYPE])
/* names.c */
#define is_channel (*(int (*)(char *))global[IS_CHANNEL])
#define make_channel (*(char *(*)(char *))global[MAKE_CHANNEL])
#define is_chanop (*(int (*)(char *, char *))global[IS_CHANOP])
#define is_halfop (*(int (*)(char *, char *))global[IS_HALFOP])
#define im_on_channel (*(int (*)(char *, int ))global[IM_ON_CHANNEL])
#define is_on_channel (*(int (*)(char *, int , char *))global[IS_ON_CHANNEL])
#define add_channel (*(ChannelList *(*)(char *, int, int))global[ADD_CHANNEL])
#define add_to_channel (*(ChannelList *(*)(char *, char *, int, int, int, char *, char *, char *, int, int))global[ADD_TO_CHANNEL])
#define get_channel_key (*(char *(*)(char *, int ))global[GET_CHANNEL_KEY])
#define recreate_mode (*(char *(*)(ChannelList *))global[FUNC_RECREATE_MODE])
#define do_compress_modes (*(char *(*)(ChannelList *, int, char *, char *))global[FUNC_COMPRESS_MODES])
#define got_ops (*(int (*)(int, ChannelList *))global[FUNC_GOT_OPS])
#define get_channel_bans (*(char *(*)(char *, int , int ))global[GET_CHANNEL_BANS])
#define get_channel_mode (*(char *(*)(char *, int ))global[GET_CHANNEL_MODE])
#define clear_bans (*(void (*)(ChannelList *))global[CLEAR_BANS])
#define remove_channel (*(void (*)(char *, int ))global[REMOVE_CHANNEL])
#define remove_from_channel (*(void (*)(char *, char *, int , int , char *))global[REMOVE_FROM_CHANNEL])
#define rename_nick (*(void (*)(char *, char *, int ))global[RENAME_NICK])
#define get_channel_oper (*(int (*)(char *, int ))global[GET_CHANNEL_OPER])
#define get_channel_halfop (*(int (*)(char *, int ))global[GET_CHANNEL_HALFOP])
#define get_channel_voice (*(int (*)(char *, int ))global[GET_CHANNEL_VOICE])
#define fetch_userhost (*(char *(*)(int , char *))global[FETCH_USERHOST])
#define create_channel_list (*(char *(*)(Window *))global[CREATE_CHANNEL_LIST])
#define flush_channel_stats (*(void (*)(void ))global[FLUSH_CHANNEL_STATS])
#define lookup_channel (*(ChannelList *(*)(char *, int, int))global[LOOKUP_CHANNEL])
/* hash.c */
#define find_nicklist_in_channellist (*(NickList *(*)(char *, ChannelList *, int))global[FIND_NICKLIST_IN_CHANNELLIST])
#define add_nicklist_to_channellist (*(void (*)(NickList *, ChannelList *))global[ADD_NICKLIST_TO_CHANNELLIST])
#define next_nicklist (*(NickList *(*)(ChannelList *, NickList *))global[NEXT_NICKLIST])
#define next_namelist (*(List *(*)(HashEntry *, List *, unsigned int))global[NEXT_NAMELIST])
#define add_name_to_genericlist (*(void (*)(char *, HashEntry *, unsigned int))global[ADD_NAME_TO_GENERICLIST])
#define find_name_in_genericlist (*(List *(*)(char *, HashEntry *, unsigned int, int))global[FIND_NAME_IN_GENERICLIST])
#define add_whowas_userhost_channel (*(void (*)(WhowasList *, WhowasWrapList *))global[ADD_WHOWAS_USERHOST_CHANNEL])
#define find_userhost_channel (*(WhowasList *(*)(char *, char *, int, WhowasWrapList *))global[FIND_USERHOST_CHANNEL])
#define next_userhost (*(WhowasList *(*)(WhowasWrapList *, WhowasList *))global[NEXT_USERHOST])
#define sorted_nicklist (*(NickList *(*)(ChannelList *, int))global[SORTED_NICKLIST])
#define clear_sorted_nicklist (*(void (*)(NickList **))global[CLEAR_SORTED_NICKLIST])
#define add_name_to_floodlist (*(Flooding *(*)(char *, char *, char *, HashEntry *, unsigned int))global[ADD_NAME_TO_FLOODLIST])
#define find_name_in_floodlist (*(Flooding *(*)(char *, char *, HashEntry *, unsigned int, int))global[FIND_NAME_IN_FLOODLIST])
#define remove_oldest_whowas_hashlist (*(int (*)(WhowasWrapList *, time_t, int))global[REMOVE_OLDEST_WHOWAS_HASHLIST])
/* cset.c fset.c vars.c set string and set int ops */
#define fget_string_var (*(char *(*)(enum FSET_TYPES ))global[FGET_STRING_VAR])
#define fset_string_var (*(void (*)(enum FSET_TYPES , char *))global[FSET_STRING_VAR])
#define get_wset_string_var (*(char *(*)(WSet *, int))global[GET_WSET_STRING_VAR])
#define set_wset_string_var (*(void (*)(WSet *, int, char *))global[SET_WSET_STRING_VAR])
#define get_cset_int_var (*(int (*)(CSetList *, int))global[GET_CSET_INT_VAR])
#define set_cset_int_var (*(void (*)(CSetList *, int, int))global[SET_CSET_INT_VAR])
#define get_cset_str_var (*(char *(*)(CSetList *, int))global[GET_CSET_STR_VAR])
#define set_cset_str_var (*(void (*)(CSetList *, int, const char *))global[SET_CSET_STR_VAR])
#define get_dllint_var (*(int (*)(char *))global[GET_DLLINT_VAR])
#define set_dllint_var (*(void (*)(char *, unsigned int ))global[SET_DLLINT_VAR])
#define get_dllstring_var (*(char *(*)(char *))global[GET_DLLSTRING_VAR])
#define set_dllstring_var (*(void (*)(char *, char *))global[SET_DLLSTRING_VAR])
#define get_int_var (*(int (*)(enum VAR_TYPES ))global[GET_INT_VAR])
#define set_int_var (*(void (*)(enum VAR_TYPES , unsigned int ))global[SET_INT_VAR])
#define get_string_var (*(char *(*)(enum VAR_TYPES ))global[GET_STRING_VAR])
#define set_string_var (*(void (*)(enum VAR_TYPES , char *))global[SET_STRING_VAR])
/* module.c */
#define add_module_proc (*(int (*)(unsigned int , char *, char *, char *, int , int , void *, void *))global[ADD_MODULE_PROC])
#define remove_module_proc (*(int (*)(unsigned int , char *, char *, char *))global[REMOVE_MODULE_PROC])
/* timer.c */
#define add_timer (*(char *(*)(int , char *, double , long , int (*)(void *, char *), char *, char *, int , char *))global[ADD_TIMER])
#define delete_timer (*(int (*)(char *))global[DELETE_TIMER])
#define delete_all_timers (*(void (*)(void ))global[DELETE_ALL_TIMERS])
/* server.c */
#define send_to_server (*(void (*)(const char *, ...))global[SEND_TO_SERVER])
#define queue_send_to_server (*(void (*)(int, const char *, ...))global[QUEUE_SEND_TO_SERVER])
#define my_send_to_server (*(void (*)(int, const char *, ...))global[MY_SEND_TO_SERVER])
#define get_connected (*(void (*)(int , int ))global[GET_CONNECTED])
#define connect_to_server_by_refnum (*(int (*)(int , int ))global[CONNECT_TO_SERVER_BY_REFNUM])
#define close_server (*(void (*)(int , char *))global[CLOSE_SERVER])
#define is_server_connected (*(int (*)(int ))global[IS_SERVER_CONNECTED])
#define flush_server (*(void (*)(void ))global[FLUSH_SERVER])
#define server_is_connected (*(void (*)(int , int ))global[SERVER_IS_CONNECTED])
#define is_server_open (*(int (*)(int ))global[IS_SERVER_OPEN])
#define close_all_server (*(void (*)(void ))global[CLOSE_ALL_SERVER])
#define read_server_file (*(int (*)(char *))global[READ_SERVER_FILE])
#define add_to_server_list (*(void (*)(char *, int , char *, char *, char *, char *, char *, int , int ))global[ADD_TO_SERVER_LIST])
#define build_server_list (*(int (*)(char *))global[BUILD_SERVER_LIST])
#define display_server_list (*(void (*)(void ))global[DISPLAY_SERVER_LIST])
#define create_server_list (*(char *(*)(char *))global[CREATE_SERVER_LIST])
#define parse_server_info (*(void (*)(char *, char **, char **, char **, char **, char **, char **))global[PARSE_SERVER_INFO])
#define server_list_size (*(int (*)(void ))global[SERVER_LIST_SIZE])
#define find_server_refnum (*(int (*)(char *, char **))global[FIND_SERVER_REFNUM])
#define find_in_server_list (*(int (*)(char *, int ))global[FIND_IN_SERVER_LIST])
#define parse_server_index (*(int (*)(char *))global[PARSE_SERVER_INDEX])
#define set_server_redirect (*(void (*)(int , const char *))global[SET_SERVER_REDIRECT])
#define get_server_redirect (*(char *(*)(int ))global[GET_SERVER_REDIRECT])
#define check_server_redirect (*(int (*)(char *))global[CHECK_SERVER_REDIRECT])
#define fudge_nickname (*(void (*)(int , int ))global[FUDGE_NICKNAME])
#define reset_nickname (*(void (*)(int ))global[RESET_NICKNAME])
#define set_server_cookie (*(void (*)(int , char *))global[SET_SERVER_COOKIE])
#define set_server_flag (*(void (*)(int , int , int ))global[SET_SERVER_FLAG])
#define set_server_motd (*(void (*)(int , int ))global[SET_SERVER_MOTD])
#define set_server_operator (*(void (*)(int , int ))global[SET_SERVER_OPERATOR])
#define set_server_itsname (*(void (*)(int , char *))global[SET_SERVER_ITSNAME])
#define set_server_version (*(void (*)(int , int ))global[SET_SERVER_VERSION])
#define set_server_lag (*(void (*)(int , int ))global[SET_SERVER_LAG])
#define set_server_password (*(char *(*)(int , char *))global[SET_SERVER_PASSWORD])
#define set_server_nickname (*(void (*)(int , char *))global[SET_SERVER_NICKNAME])
#define set_server2_8 (*(void (*)(int , int ))global[SET_SERVER2_8])
#define set_server_away (*(void (*)(int , char *, int ))global[SET_SERVER_AWAY])
#define get_server_cookie (*(char *(*)(int ))global[GET_SERVER_COOKIE])
#define get_server_nickname (*(char *(*)(int ))global[GET_SERVER_NICKNAME])
#define get_server_name (*(char *(*)(int ))global[GET_SERVER_NAME])
#define get_server_itsname (*(char *(*)(int ))global[GET_SERVER_ITSNAME])
#define get_server_motd (*(int (*)(int ))global[GET_SERVER_MOTD])
#define get_server_operator (*(int (*)(int ))global[GET_SERVER_OPERATOR])
#define get_server_version (*(int (*)(int ))global[GET_SERVER_VERSION])
#define get_server_flag (*(int (*)(int , int ))global[GET_SERVER_FLAG])
#define get_possible_umodes (*(char *(*)(int ))global[GET_POSSIBLE_UMODES])
#define get_server_port (*(int (*)(int ))global[GET_SERVER_PORT])
#define get_server_lag (*(int (*)(int ))global[GET_SERVER_LAG])
#define get_server2_8 (*(int (*)(int ))global[GET_SERVER2_8])
#define get_umode (*(char *(*)(int ))global[GET_UMODE])
#define get_server_away (*(char *(*)(int ))global[GET_SERVER_AWAY])
#define get_server_network (*(char *(*)(int ))global[GET_SERVER_NETWORK])
#define get_pending_nickname (*(char *(*)(int ))global[GET_PENDING_NICKNAME])
#define server_disconnect (*(void (*)(int , char *))global[SERVER_DISCONNECT])
#define get_server_list (*(Server *(*)(void))global[GET_SERVER_LIST])
#define get_server_channels (*(ChannelList *(*)(int))global[GET_SERVER_CHANNELS])
#define set_server_last_ctcp_time (*(void (*)(int , time_t))global[SET_SERVER_LAST_CTCP_TIME])
#define get_server_last_ctcp_time (*(time_t (*)(int))global[GET_SERVER_LAST_CTCP_TIME])
#define set_server_trace_flag (*(void (*)(int , int ))global[SET_SERVER_TRACE_FLAG])
#define get_server_trace_flag (*(int (*)(int ))global[GET_SERVER_TRACE_FLAG])
#define get_server_read (*(int (*)(int ))global[GET_SERVER_READ])
#define get_server_linklook (*(int (*)(int ))global[GET_SERVER_LINKLOOK])
#define set_server_linklook (*(void (*)(int , int ))global[SET_SERVER_LINKLOOK])
#define get_server_stat_flag (*(int (*)(int ))global[GET_SERVER_STAT_FLAG])
#define set_server_stat_flag (*(void (*)(int , int ))global[SET_SERVER_STAT_FLAG])
#define get_server_linklook_time (*(time_t (*)(int ))global[GET_SERVER_LINKLOOK_TIME])
#define set_server_linklook_time (*(void (*)(int , time_t))global[SET_SERVER_LINKLOOK_TIME])
#define get_server_trace_kill (*(int (*)(int ))global[GET_SERVER_TRACE_KILL])
#define set_server_trace_kill (*(void (*)(int , int ))global[SET_SERVER_TRACE_KILL])
#define add_server_channels (*(void (*)(int, ChannelList *))global[ADD_SERVER_CHANNELS])
#define set_server_channels (*(void (*)(int, ChannelList *))global[SET_SERVER_CHANNELS])
#define send_msg_to_channels (*(void (*)(ChannelList *, int, char *))global[SEND_MSG_TO_CHANNELS])
#define send_msg_to_nicks (*(void (*)(ChannelList *, int, char *))global[SEND_MSG_TO_NICKS])
#define is_server_queue (*(int (*)(void ))global[IS_SERVER_QUEUE])
/* sockets */
#define add_socketread (*(int (*)(int, int, unsigned long, char *, void (*)(int), void (*)(int)))global[ADD_SOCKETREAD])
#define add_sockettimeout (*(void (*)(int , time_t, void *))global[ADD_SOCKETTIMEOUT])
#define close_socketread (*(void (*)(int ))global[CLOSE_SOCKETREAD])
#define get_socket (*(SocketList *(*)(int ))global[GET_SOCKET])
#define set_socketflags (*(unsigned long (*)(int , unsigned long ))global[SET_SOCKETFLAGS])
#define get_socketflags (*(unsigned long (*)(int ))global[GET_SOCKETFLAGS])
#define check_socket (*(int (*)(int ))global[CHECK_SOCKET])
#define read_sockets (*(int (*)(int , unsigned char *, int ))global[READ_SOCKETS])
#define write_sockets (*(int (*)(int , unsigned char *, int , int ))global[WRITE_SOCKETS])
#define get_max_fd (*(int (*)(void ))global[GET_MAX_FD])
#define new_close (*(int (*)(int ))global[NEW_CLOSE])
#define new_open (*(int (*)(int ))global[NEW_OPEN])
#define dgets (*(int (*)(char *, int , int , int , void *))global[DGETS])
#define get_socketinfo (*(void *(*)(int ))global[GET_SOCKETINFO])
#define set_socketinfo (*(void (*)(int , void *))global[SET_SOCKETINFO])
#define set_socket_write (*(int (*)(int ))global[SET_SOCKETWRITE])
/* flood.c */
#define is_other_flood (*(int (*)(ChannelList *, NickList *, int, int *))global[IS_OTHER_FLOOD])
#define check_flooding (*(int (*)(char *, int , char *, char *))global[CHECK_FLOODING])
#define flood_prot (*(int (*)(char *, char *, char *, int , int , char *))global[FLOOD_PROT])
/* expr.c */
#define next_unit (*(char *(*)(char *, const char *, int *, int ))global[NEXT_UNIT])
#define parse_inline (*(char *(*)(char *, const char *, int *))global[PARSE_INLINE])
#define expand_alias (*(char *(*)(const char *, const char *, int *, char **))global[EXPAND_ALIAS])
#define alias_special_char (*(char *(*)(char **, char *, const char *, char *, int *))global[ALIAS_SPECIAL_CHAR])
#define parse_line (*(void (*)(const char *, char *, const char *, int , int , int ))global[PARSE_LINE])
#define parse_command (*(int (*)(char *, int , char *))global[PARSE_COMMAND_FUNC])
#define make_local_stack (*(void (*)(char *))global[MAKE_LOCAL_STACK])
#define destroy_local_stack (*(void (*)(void ))global[DESTROY_LOCAL_STACK])
/* dcc.c */
#define dcc_create (*(DCC_int *(*)(char *, char *, char *, unsigned long, int, int, unsigned long, void (*)(int)))global[DCC_CREATE_FUNC])
#define find_dcc (*(SocketList *(*)(char *, char *, char *, int, int, int, int))global[FIND_DCC_FUNC])
#define erase_dcc_info (*(void (*)(int, int, char *, ...))global[ERASE_DCC_INFO])
#define add_dcc_bind (*(int (*)(char *, char *, void *, void *, void *, void *, void *))global[ADD_DCC_BIND])
#define remove_dcc_bind (*(int (*)(char *, int ))global[REMOVE_DCC_BIND])
#define remove_all_dcc_binds (*(int (*)(char *))global[REMOVE_ALL_DCC_BINDS])
#define get_active_count (*(int (*)(void ))global[GET_ACTIVE_COUNT])
#define get_num_queue (*(int (*)(void ))global[GET_NUM_QUEUE])
#define add_to_queue (*(int (*)(char *, char *, pack *))global[ADD_TO_QUEUE])
#define dcc_filesend (*(void (*)(char *, char *))global[DCC_FILESEND])
#define dcc_resend (*(void (*)(char *, char *))global[DCC_RESEND])
/* irc.c */
#define irc_exit (*(void (*)(int, char *, char *, ...))global[IRC_EXIT_FUNC])
#define io (*(void (*)(const char *))global[IRC_IO_FUNC])
/* commands.c */
#define find_command (*(IrcCommand *(*)(char *, int *))global[FIND_COMMAND_FUNC])
#define lock_stack_frame (*(void (*)(void ))global[LOCK_STACK_FRAME])
#define unlock_stack_frame (*(void (*)(void ))global[UNLOCK_STACK_FRAME])
/* who.c */
#define userhostbase (*(void (*)(char *, void (*)(UserhostItem *, char *, char *), int, char *, ...))global[USERHOSTBASE])
#define isonbase (*(void (*)(char *, void (*)(char *, char *)))global[ISONBASE])
#define whobase (*(void (*)(char *, void (*)(WhoEntry *, char *, char **), void (*)(WhoEntry *, char *, char **), char *, ...))global[WHOBASE])
#define add_to_window_list (*(Window *(*)(struct ScreenStru *, Window *))global[ADD_TO_WINDOW_LIST])
/*
* Rest of these are all variables of various sorts.
*/
#ifndef MAIN_SOURCE
#define nickname ((char *) *global[NICKNAME])
#define irc_version ((char *) *global[IRC_VERSION])
#define from_server (*(int *)global[FROM_SERVER])
#define connected_to_server ((int) *((int *)global[CONNECTED_TO_SERVER]))
#define primary_server ((int) *((int *)global[PRIMARY_SERVER]))
#define parsing_server_index ((int) *((int *)global[PARSING_SERVER_INDEX]))
#define now ((time_t) *((time_t *)global[NOW]))
#define start_time ((time_t) *((time_t *)global[START_TIME]))
#define idle_time() ((time_t) *((time_t *)global[IDLE_TIME]()))
#define loading_global (*((int *)global[LOADING_GLOBAL]))
#define target_window (*((Window **)global[TARGET_WINDOW]))
#define current_window (*((Window **)global[CURRENT_WINDOW]))
#define invisible_list (*((Window **)global[INVISIBLE_LIST]))
#define main_screen (*((Screen **)global[MAIN_SCREEN]))
#define last_input_screen (*((Screen **)global[LAST_INPUT_SCREEN]))
#define output_screen (*((Screen **)global[OUTPUT_SCREEN]))
#define screen_list (*((Screen **)global[SCREEN_LIST]))
#define irclog_fp (*((FILE **)global[IRCLOG_FP]))
#define dll_functions (*((BuiltInDllFunctions **)global[DLL_FUNCTIONS]))
#define dll_numeric (*((NumericFunction **)global[DLL_NUMERIC]))
#define dll_commands (*((IrcCommandDll **)global[DLL_COMMANDS]))
#define dll_variable (*((IrcVariableDll **)global[DLL_VARIABLE]))
#define dll_ctcp (*((CtcpEntryDll **)global[DLL_CTCP]))
#define dll_window (*((WindowDll **)global[DLL_WINDOW]))
#define window_display ((int) *((int *)global[WINDOW_DISPLAY]))
#define status_update_flag ((int) *((int *)global[STATUS_UPDATE_FLAG]))
#define tabkey_array (*((NickTab **)global[TABKEY_ARRAY]))
#define autoreply_array (*((NickTab *)global[AUTOREPLY_ARRAY]))
#define identd (*((int *)global[IDENTD_SOCKET]))
#define doing_notice ((int) *((int *)global[DOING_NOTICE]))
#define default_output_function (*(void (**)(char *))global[DEFAULT_OUTPUT_FUNCTION])
#define serv_open_func (*(int (**)(int, unsigned long, int))global[SERV_OPEN_FUNC])
#define serv_input_func (*(int (**)(int, char *, int, int, int))global[SERV_INPUT_FUNC])
#define serv_output_func (*(int (**)(int, int, char *, int))global[SERV_OUTPUT_FUNC])
#define serv_close_func (*(int (**)(int, unsigned long, int))global[SERV_CLOSE_FUNC])
#if 0
#define check_ext_mail_status (*(int (**)()) global[CHECK_EXT_MAIL_STATUS])
#define check_ext_mail (*(char *(**)())global[CHECK_EXT_MAIL])
#endif
#ifdef WANT_TCL
#define tcl_interp ((Tcl_Interp *)((Tcl_Interp **)(global[VAR_TCL_INTERP])))
#else
#define tcl_interp NULL
#endif
#else
#undef get_time
#define get_time(a) BX_get_time(a)
#endif /* MAIN_SOURCE */
#ifdef GUI
#ifndef MAIN_SOURCE
#define lastclicklinedata ((char *) *global[LASTCLICKLINEDATA])
#define contextx ((int) *((int *)global[CONTEXTX]))
#define contexty ((int) *((int *)global[CONTEXTY]))
#define guiipc ((int) *((int *)global[GUIIPC]))
#endif
#define gui_mutex_lock() ((void (*)(void)) global[GUI_MUTEX_LOCK])()
#define gui_mutex_unlock() ((void (*)(void))global[GUI_MUTEX_UNLOCK])()
#endif
#endif /* WTERM_C || STERM_C */
#endif

98
include/names.h Normal file
View File

@@ -0,0 +1,98 @@
/*
* names.h: Header for names.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: names.h 134 2011-08-30 14:50:42Z keaston $
*/
#ifndef __names_h_
#define __names_h_
#include "window.h"
#include "irc.h"
/* for lookup_channel() */
#define CHAN_NOUNLINK 1
#define CHAN_UNLINK 2
#define GOTNAMES 0x01
#define GOTMODE 0x02
#define GOTBANS 0x04
#define GOTWHO 0x08
#define GOTEXEMPT 0x10
/* Channel mode flags */
#define MODE_ANONYMOUS (1U << 0) /* av2.9 */
#define MODE_C (1U << 1) /* erf/TS4 */
#define MODE_INVITE (1U << 2) /* RFC */
#define MODE_KEY (1U << 3) /* RFC */
#define MODE_LIMIT (1U << 4) /* RFC */
#define MODE_MODERATED (1U << 5) /* RFC */
#define MODE_MSGS (1U << 6) /* RFC */
#define MODE_PRIVATE (1U << 7) /* RFC */
#define MODE_REGISTERED (1U << 8) /* Dalnet */
#define MODE_SECRET (1U << 9) /* RFC */
#define MODE_TOPIC (1U << 10) /* RFC */
#define MODE_Z (1U << 11) /* erf/TS4 */
#define MODE_RESTRICTED (1U << 12) /* Dalnet */
void add_to_join_list (char *, int, int);
void remove_from_join_list (char *, int);
char *get_chan_from_join_list (int);
int get_win_from_join_list (char *, int);
int in_join_list (char *, int);
int got_info (char *, int, int);
int is_channel_mode (char *, int, int);
int BX_is_chanop (char *, char *);
int BX_is_halfop (char *, char *);
char *is_chanoper (char *, char *);
ChannelList *BX_lookup_channel (char *, int, int);
char *BX_get_channel_mode (char *, int);
#ifdef INCLUDE_UNUSED_FUNCTIONS
void set_channel_mode (char *, int, char *);
#endif /* INCLUDE_UNUSED_FUNCTIONS */
ChannelList * BX_add_channel (char *, int, int);
ChannelList * BX_add_to_channel (char *, char *, int, int, int, char *, char *, char *, int, int);
void BX_remove_channel (char *, int);
void BX_remove_from_channel (char *, char *, int, int, char *);
int BX_is_on_channel (char *, int, char *);
void list_channels (void);
void reconnect_all_channels (int);
void switch_channels (char, char *);
char *what_channel (char *, int);
ChannelList *walk_channels (char *, int, int);
char *real_channel (void);
void BX_rename_nick (char *, char *, int);
void update_channel_mode (char *, char *, int, char *, ChannelList *);
void set_channel_window (Window *, char *, int);
char *BX_create_channel_list (Window *);
int BX_get_channel_oper (char *, int);
int BX_get_channel_halfop (char *, int);
void channel_server_delete (int);
void change_server_channels (int, int);
void clear_channel_list (int);
void set_waiting_channel (int);
void remove_from_mode_list (char *, int);
int chan_is_connected (char *, int);
int BX_im_on_channel (char *, int);
char *BX_recreate_mode (ChannelList *);
int BX_get_channel_voice (char *, int);
char *BX_get_channel_key(char *, int);
char *BX_fetch_userhost (int, char *);
void unset_window_current_channel (Window *);
void move_window_channels (Window *);
void reassign_window_channels (Window *);
void check_channel_limits();
void BX_clear_bans(ChannelList *);
char *BX_do_compress_modes(ChannelList *, int, char *, char*);
int BX_got_ops(int, ChannelList *);
void BX_flush_channel_stats (void);
char *BX_get_channel_bans(char *, int, int);
#endif /* __names_h_ */

27
include/newio.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* newio.h -- header file for newio.c
*
* Copyright 1990, 1995 Michael Sandrof, Matthew Green
* Copyright 1997 EPIC Software Labs
*/
#ifndef __newio_h__
#define __newio_h__
#include "ssl.h"
extern int dgets_errno;
const char *dgets_strerror(int);
int BX_dgets (char *, int, int, int, void *);
int new_select (fd_set *, fd_set *, struct timeval *);
int BX_new_open (int);
int BX_new_close (int);
int new_close_write (int);
int new_open_write (int);
void set_socket_options (int);
size_t get_pending_bytes (int);
#define IO_BUFFER_SIZE 8192
#endif

37
include/notice.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef _NOTICE_H
#define _NOTICE_H
#ifdef WANT_OPERVIEW
#undef NEWNET_IRCOP
#define NICK_COLLIDE 0x000001
#define NICK_KILL 0x000002
#define IP_MISMATCH 0x000004
#define HACK_OPS 0x000008
#define IDENTD 0x000010
#define FAKE_MODE 0x000020
#define UNAUTHS 0x000040
#define TOO_MANY 0x000080
#define TRAFFIC 0x000100
#define REHASH 0x000200
#define KLINE 0x000400
#define POSSIBLE_BOT 0x000800
#define OPER_MODE 0x001000
#define SQUIT 0x002000
#define SERVER_CONNECT 0x004000
#define CLIENT_CONNECT 0x008000
#define TERM_FLOOD 0x010000
#define INVALID_USER 0x020000
#define STATS_REQUEST 0x040000
#define NICK_FLOODING 0x080000
#define KILL_ACTIVE 0x100000
#define SERVER_CRAP 0x200000
void s_watch (char *, char *, char *, char *);
void ov_window (char *, char *, char *, char *);
void setup_ov_mode (int, int, int);
#endif
#endif

37
include/notify.h Normal file
View File

@@ -0,0 +1,37 @@
/*
* notify.h: header for notify.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: notify.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __notify_h_
#define __notify_h_
void show_notify_list (int);
BUILT_IN_COMMAND(notify);
void do_notify (void);
void notify_mark (char *, char *, int, int);
void save_notify (FILE *);
void set_notify_handler (Window *, char *, int);
void make_notify_list (int);
int hard_uh_notify (int, char *, char *, char *);
extern char *get_notify_nicks (int, int, char *, int);
void add_delay_notify (int);
void notify_count (int, int *, int *);
void rebuild_notify_ison (int);
void rebuild_all_ison (void);
void save_watch(FILE *);
BUILT_IN_COMMAND(watchcmd);
void show_watch_list (int);
void make_watch_list (int);
void show_watch_notify (char *, int, char **);
void send_watch (int);
char *get_watch_nicks (int, int, char *, int);
#endif /* __notify_h_ */

23
include/numbers.h Normal file
View File

@@ -0,0 +1,23 @@
/*
* numbers.h: header for numbers.c
*
* written by michael sandrof
*
* copyright(c) 1990
*
* see the copyright file, or do a help ircii copyright
*
* @(#)$Id: numbers.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __numbers_h_
#define __numbers_h_
char *numeric_banner (void);
void display_msg (char *, char **);
void numbered_command (char *, int, char **);
void got_initial_version_28 (char **);
int check_sync (int, char *, char *, char *, char *, ChannelList *);
#endif /* __numbers_h_ */

53
include/options.h Normal file
View File

@@ -0,0 +1,53 @@
static const char compile_time_options[] = {
'a',
#ifdef NO_BOTS
'b',
#endif /* NO_BOTS */
#ifdef BITCHX_DEBUG
'd',
#endif /* BITCHX_DEBUG */
#ifdef EXEC_COMMAND
'e',
#endif /* EXEC_COMMAND */
#ifdef INCLUDE_GLOB_FUNCTION
'g',
#endif /* INCLUDE_GLOB_FUNCTION */
#ifdef WANT_HEBREW
'h',
#endif
#ifdef MIRC_BROKEN_DCC_RESUME
'i',
#endif /* MIRC_BROKEN_DCC_RESUME */
#ifdef HACKED_DCC_WARNING
'k',
#endif /* HACKED_DCC_WARNING */
#ifdef WANT_DLL
'l',
#endif
#ifdef STRIP_EXTRANEOUS_SPACES
's',
#endif /* STRIP_EXTRANEOUS_SPACES */
#ifdef WANT_TCL
't',
#endif
#ifdef UNAME_HACK
'u',
#endif /* UNAME_HACK */
#ifdef ALLOW_STOP_IRC
'z',
#endif /* ALLOW_STOP_IRC */
'\0'
};

42
include/output.h Normal file
View File

@@ -0,0 +1,42 @@
/*
* output.h: header for output.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: output.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __output_h_
#define __output_h_
void put_echo (char *);
void BX_put_it (const char *, ...);
void BX_send_to_server (const char *, ...);
void BX_my_send_to_server (int, const char *, ...);
void BX_queue_send_to_server (int, const char *, ...);
void say (const char *, ...);
void BX_bitchsay (const char *, ...);
void serversay (int, int, const char *, ...);
void BX_yell (const char *, ...);
void error (const char *, ...);
void refresh_screen (unsigned char, char *);
int init_output (void);
int init_screen (void);
void put_file (char *);
void charset_ibmpc (void);
void charset_lat1 (void);
void charset_graf (void);
void charset_cst(void);
char *ov_server(int server);
extern FILE *irclog_fp;
#endif /* __output_h_ */

51
include/parse.h Normal file
View File

@@ -0,0 +1,51 @@
/*
* parse.h
*
* written by matthew green
* copyright (c) 1993
*
* @(#)$Id: parse.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __parse_h_
#define __parse_h_
typedef struct {
const char *command;
void (*inbound_handler) (char *, char **);
void (*outbound_handler) (char *);
int flags;
unsigned long bytes;
unsigned long count;
} protocol_command;
extern protocol_command rfc1459[];
extern int num_protocol_cmds;
#define PROTO_NOQUOTE 1 << 0
#define PROTO_DEPREC 1 << 1
char *BX_PasteArgs (char **, int);
int BX_BreakArgs (char *, char **, char **, int);
void parse_server (char *);
void irc2_parse_server (char *);
int annoy_kicks (int, char *, char *, char *, NickList *);
int ctcp_flood_check (char *, char *, char *);
void load_scripts (void);
int check_auto_reply (char *);
extern char *FromUserHost;
extern char *last_split_server;
extern char *last_split_from;
extern int in_server_ping;
extern int doing_privmsg;
#define WAIT_WHO 0
#define WAIT_BANS 1
#define WAIT_MODE 2
#define MAXPARA 15
#endif /* __parse_h_ */

16
include/queue.h Normal file
View File

@@ -0,0 +1,16 @@
/*
* queue.h: header for queue.c
*
* copyright(c) 1994 matthew green
*
* See the copyright file, or do a help ircii copyright
*
* @(#)$Id: queue.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __queue_h
# define __queue_h
void queuecmd (char *, char *, char *, char *);
#endif /* __queue_h */

82
include/screen.h Normal file
View File

@@ -0,0 +1,82 @@
/*
* screen.h: header for screen.c
*
* written by matthew green.
*
* copyright (c) 1993, 1994.
*
* see the copyright file, or type help ircii copyright
*
* @(#)$Id: screen.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __screen_h_
#define __screen_h_
#include "window.h"
#define WAIT_PROMPT_LINE 0x01
#define WAIT_PROMPT_KEY 0x02
#define WAIT_PROMPT_DUMMY 0x04
/* Stuff for the screen/xterm junk */
#define ST_NOTHING -1
#define ST_SCREEN 0
#define ST_XTERM 1
/* This is here because it happens in so many places */
#define curr_scr_win current_screen->current_window
void clear_window (Window *);
int BX_output_line (const unsigned char *);
Window *BX_create_additional_screen (void);
void BX_scroll_window (Window *);
void update_all_windows (void);
void BX_add_wait_prompt (char *, void (*) (char *, char *), char *, int, int);
void BX_cursor_in_display (Window *);
int BX_is_cursor_in_display (Screen *);
void BX_cursor_not_in_display (Screen *);
void set_current_screen (Screen *);
void window_redirect (char *, int);
void redraw_resized (Window *, ShrinkInfo, int);
void close_all_screen (void);
RETSIGTYPE sig_refresh_screen (int);
int check_screen_redirect (char *);
void BX_kill_screen (Screen *);
int rite (Window *, const unsigned char *);
ShrinkInfo resize_display (Window *);
void redraw_window (Window *, int);
void redraw_all_windows (void);
void BX_add_to_screen (unsigned char *);
void do_screens (fd_set *);
unsigned char **BX_split_up_line(const unsigned char *, int);
void BX_xterm_settitle(void);
void BX_add_to_window(Window *, const unsigned char *);
Screen * BX_create_new_screen(void);
#ifdef GUI
void refresh_window_screen(Window *);
#endif
u_char *BX_strip_ansi (const u_char *);
char *normalize_color (int, int, int, int);
const u_char *BX_skip_ctl_c_seq (const u_char *, int *, int *, int);
u_char **BX_prepare_display (const u_char *, int, int *, int);
int BX_output_with_count (const unsigned char *, int, int);
unsigned char *BX_skip_incoming_mirc (unsigned char *);
void delchar(unsigned char **text, int cnum);
/* Dont do any word-wrapping, just truncate each line at its place. */
#define PREPARE_NOWRAP 0x01
extern Screen *main_screen;
extern Screen *last_input_screen;
extern Screen *screen_list;
extern Screen *output_screen;
extern Window *debugging_window;
extern int strip_ansi_never_xlate;
#endif /* __screen_h_ */

444
include/server.h Normal file
View File

@@ -0,0 +1,444 @@
/*
* server.h: header for server.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: server.h 87 2010-06-26 08:18:34Z keaston $
*/
#ifndef __server_h_
#define __server_h_
/* for ChannelList */
#include "who.h"
#include "names.h"
#include "struct.h"
#include "ssl.h"
/*
* type definition to distinguish different
* server versions
*/
#define Server2_7 0
#define Server2_8 1
#define Server2_9 2
#define Server2_10 3
#define Server2_8ts4 4
#define Server2_8hybrid 5
#define Server2_8hybrid6 6
#define Server2_8comstud 7
#define Server_u2_8 10
#define Server_u2_9 11
#define Server_u2_10 12
#define Server_u3_0 13
struct notify_stru;
typedef struct _queued_send
{
struct _queued_send *next;
int server;
int des;
char *buffer;
} QueueSend;
typedef struct _sping_ {
struct _sping_ *next;
char *sname;
#ifdef HAVE_GETTIMEOFDAY
struct timeval in_sping;
#else
time_t in_sping;
#endif
} Sping;
/* Server: a structure for the server_list */
typedef struct
{
char *name; /* the name of the server */
char *itsname; /* the server's idea of its name */
char *password; /* password for that server */
char *snetwork;
char *cookie; /* TS4 op cookie */
int port; /* port number on that server */
char *nickname; /* nickname for this server */
char *s_nickname; /* last NICK command sent */
char *d_nickname; /* Default nickname to use */
char *userhost;
int fudge_factor; /* How much s_nickname's fudged */
int nickname_pending; /* Is a NICK command pending? */
int orignick_pending; /* Is a ORIGNICK command pending? */
int server_change_pending; /* We are waiting for a server change */
char *away; /* away message for this server */
time_t awaytime;
int operator; /* true if operator */
int server2_8;
int version; /* the version of the server -
* defined above */
char *version_string; /* what is says */
int whois; /* true if server sends numeric 318 */
long flags; /* Various flags */
long flags2;
int login_flags; /* server login flags */
char *umodes;
char umode[80]; /* User Mode storage */
int connected; /* true if connection is assured */
int write; /* write descriptor */
int read; /* read descriptior */
int eof; /* eof flag for server */
int motd; /* motd flag (used in notice.c) */
int sent; /* set if something has been sent,
* used for redirect */
int lag; /* indication of lag from server CDE*/
time_t lag_time; /* time ping sent to server CDE */
time_t last_msg; /* last mesg recieved from the server CDE */
time_t last_sent; /* last mesg time sent */
QueueSend *queue; /* queue of lines to send to a server */
char *buffer; /* buffer of what dgets() doesn't get */
WhoEntry *who_queue; /* Who queue */
IsonEntry *ison_queue; /* Ison queue */
UserhostEntry *userhost_queue;/* Userhost queue */
NotifyList notify_list; /* Notify list for this server */
NotifyList watch_list; /* Watch list for this server */
int watch; /* dalnet watch. available */
int copy_from; /* server to copy the channels from
* when (re)connecting */
int ctcp_dropped; /* */
int ctcp_not_warned; /* */
time_t ctcp_last_reply_time; /* used to limit flooding */
struct sockaddr_foobar local_addr; /* ip address of this connection */
struct sockaddr_foobar uh_addr; /* ip address of this connection */
struct sockaddr_foobar local_sockname; /* sockname of this connection */
ChannelList *chan_list; /* list of channels for this server */
int in_delay_notify;
int link_look;
time_t link_look_time;
int trace_flags;
int in_who_kill;
int in_trace_kill;
int stats_flags;
int in_timed_server;
char *redirect;
irc_server *tmplink; /* list of linked servers */
irc_server *server_last;/* list of linked servers */
irc_server *split_link; /* list of linked servers */
void (*parse_server) (char *); /* pointer to parser for this server */
unsigned long ircop_flags;
Sping *in_sping;
int reconnects;
int reconnecting;
int reconnect;
int closing;
int retries;
int try_once;
int old_server;
int req_server;
int server_change_refnum;
#ifdef NON_BLOCKING_CONNECTS
int connect_wait;
int c_server;
int from_server;
#endif
char *orignick;
time_t connect_time;
#if defined(HAVE_SSL) && !defined(IN_MODULE)
SSL_CTX* ctx;
int enable_ssl;
int ssl_error;
SSL* ssl_fd;
#endif
char *sasl_nick;
char *sasl_pass;
/* recv_nick: the nickname of the last person to send you a privmsg */
char *recv_nick;
/* sent_nick: the nickname of the last person to whom you sent a privmsg */
char *sent_nick;
char *sent_body;
} Server;
typedef struct ser_group_list
{
struct ser_group_list *next;
char *name;
int number;
} SGroup;
typedef unsigned short ServerType;
int find_server_group (char *, int);
char * find_server_group_name (int);
void BX_add_to_server_list (char *, int, char *, char *, char *, char *, char *, int, int);
int BX_build_server_list (char *);
int connect_to_server (char *, int, int);
void BX_get_connected (int, int);
void try_connect (int, int);
int BX_read_server_file (char *);
void BX_display_server_list (void);
void do_server (fd_set *, fd_set *);
int BX_connect_to_server_by_refnum (int, int);
int BX_find_server_refnum (char *, char **);
void BX_set_server_cookie (int, char *);
char *BX_get_server_cookie (int);
extern int attempting_to_connect;
/*extern int number_of_servers;*/
extern int connected_to_server;
extern int never_connected;
extern int primary_server;
extern int from_server;
extern int last_server;
extern int parsing_server_index;
extern SGroup *server_group_list;
void servercmd (char *, char *, char *, char *);
char *BX_get_server_nickname (int);
char *BX_get_server_name (int);
char *BX_get_server_itsname (int);
char *get_server_pass (int);
int BX_find_in_server_list (char *, int);
char *BX_create_server_list (char *);
void BX_set_server_motd (int, int);
int BX_get_server_motd (int);
int BX_get_server_operator (int);
int BX_get_server_version (int);
void BX_close_server (int, char *);
int BX_is_server_connected (int);
void BX_flush_server (void);
void BX_set_server_operator (int, int);
void BX_server_is_connected (int, int);
int BX_parse_server_index (char *);
void BX_parse_server_info (char *, char **, char **, char **, char **, char **, char **);
long set_server_bits (fd_set *, fd_set *);
void BX_set_server_itsname (int, char *);
void BX_set_server_version (int, int);
char *BX_get_possible_umodes(int);
int BX_is_server_open (int);
int BX_get_server_port (int);
int BX_get_server_lag (int);
void BX_set_server_lag (int, int);
time_t get_server_lagtime (int);
void set_server_lagtime (int, time_t);
char *BX_set_server_password (int, char *);
void BX_set_server_nickname (int, char *);
void BX_set_server2_8 (int , int);
int BX_get_server2_8 (int);
void BX_close_all_server (void);
void disconnectcmd (char *, char *, char *, char *);
char *BX_get_umode (int);
int BX_server_list_size (void);
void BX_set_server_away (int, char *, int);
char * BX_get_server_away (int);
time_t get_server_awaytime (int);
void set_server_awaytime (int, time_t);
void set_server_recv_nick(int server, const char *nick);
char *get_server_recv_nick(int server);
void set_server_sent_nick(int server, const char *nick);
char *get_server_sent_nick(int server);
void set_server_sent_body(int server, const char *msg_body);
char *get_server_sent_body(int server);
void server_redirect (int, char *);
int BX_check_server_redirect (char *);
char * BX_get_server_network (int);
void BX_server_disconnect (int, char *);
void send_from_server_queue (void);
void clear_sent_to_server (int);
int sent_to_server (int);
void BX_set_server_flag (int, int, int);
int BX_get_server_flag (int, int);
char * get_server_userhost (int);
void got_my_userhost (UserhostItem *item, char *nick, char *stuff);
void BX_set_server_version (int, int);
int BX_get_server_version (int);
void set_server_version_string (int, const char *);
char * get_server_version_string (int);
void BX_set_server_redirect (int, const char *);
char * BX_get_server_redirect (int);
void change_server_nickname (int, char *);
void register_server (int, char *);
void BX_fudge_nickname (int, int);
char *BX_get_pending_nickname (int);
void accept_server_nickname (int, char *);
void BX_reset_nickname (int);
void nick_command_is_pending (int, int);
void orignick_is_pending (int, int);
int is_orignick_pending (int);
void set_server_ircop_flags (int, unsigned long);
unsigned long get_server_ircop_flags (int);
extern void start_identd (void);
void set_server_in_timed (int, int);
int get_server_in_timed (int);
time_t get_server_lastmsg (int);
int close_all_servers (char *);
void close_unattached_servers (void);
void close_unattached_server(int);
void set_server_orignick (int, char *);
char *get_server_orignick (int);
ChannelList *BX_get_server_channels (int);
void BX_set_server_channels (int, ChannelList *);
void BX_add_server_channels (int, ChannelList *);
void set_server_channels_server (int);
int get_server_channels_server (int);
int BX_get_server_trace_flag (int);
void BX_set_server_trace_flag (int, int);
int BX_get_server_stat_flag (int);
void BX_set_server_stat_flag (int, int);
void set_server_reconnect (int, int);
void set_server_reconnecting (int, int);
void set_server_old_server (int, int);
void set_server_req_server (int, int);
void set_server_retries (int, int);
void set_server_try_once (int, int);
void set_server_change_refnum (int, int);
int get_server_reconnect (int);
int get_server_reconnecting (int);
int get_server_change_pending (int);
#ifdef HAVE_SSL
void set_server_ssl(int, int);
int get_server_ssl(int);
#endif
int is_server_valid(char *name, int server);
#if 0
#ifdef HAVE_GETTIMEOFDAY
struct timeval get_server_sping (int);
void set_server_sping (int, struct timeval);
#else
time_t get_server_sping (int);
void set_server_sping (int, time_t);
#endif
#endif
Sping *get_server_sping (int, char *);
void clear_server_sping (int, char *);
void set_server_sping (int, Sping *);
int BX_get_server_trace_kill (int);
void BX_set_server_trace_kill (int, int);
void BX_set_server_last_ctcp_time (int, time_t);
time_t BX_get_server_last_ctcp_time (int);
int BX_get_server_linklook (int);
void BX_set_server_linklook (int, int);
time_t BX_get_server_linklook_time (int);
void BX_set_server_linklook_time (int, time_t);
int BX_get_server_read (int);
int get_server_watch (int);
void set_server_watch (int, int);
void set_userhost_queue_top (int, UserhostEntry *);
UserhostEntry *userhost_queue_top (int);
void set_ison_queue_top (int, IsonEntry *);
IsonEntry *ison_queue_top (int);
void set_who_queue_top (int, WhoEntry *);
WhoEntry *who_queue_top (int);
void reconnect_server(int *, int *, time_t *);
int finalize_server_connect(int, int, int);
int next_server(int);
void do_idle_server (void);
/* XXXXX ick, gross, bad. XXXXX */
void password_sendline (char *data, char *line);
Server *BX_get_server_list (void);
int get_server_local_port (int);
struct sockaddr_foobar get_server_local_addr (int);
struct sockaddr_foobar get_server_uh_addr (int);
NotifyItem *get_server_notify_list (int);
void BX_send_msg_to_nicks (ChannelList *, int, char *);
void BX_send_msg_to_channels (ChannelList *, int, char *);
int BX_is_server_queue (void);
int save_servers (FILE *);
void add_split_server (char *, char *, int);
irc_server *check_split_server (char *);
void remove_split_server (int, char *);
void clean_split_server_list (int, time_t);
void write_server_list(char *);
void write_server_file (char *);
// void set_server_sasl_nick(int, const char *);
char *get_server_sasl_nick(int);
// void set_server_sasl_pass(int, const char *);
char *get_server_sasl_pass(int);
#define USER_MODE 0x0001
#define USER_MODE_A USER_MODE << 0
#define USER_MODE_B USER_MODE << 1
#define USER_MODE_C USER_MODE << 2
#define USER_MODE_D USER_MODE << 3
#define USER_MODE_E USER_MODE << 4
#define USER_MODE_F USER_MODE << 5
#define USER_MODE_G USER_MODE << 6
#define USER_MODE_H USER_MODE << 7
#define USER_MODE_I USER_MODE << 8
#define USER_MODE_J USER_MODE << 9
#define USER_MODE_K USER_MODE << 10
#define USER_MODE_L USER_MODE << 11
#define USER_MODE_M USER_MODE << 12
#define USER_MODE_N USER_MODE << 13
#define USER_MODE_O USER_MODE << 14
#define USER_MODE_P USER_MODE << 15
#define USER_MODE_Q USER_MODE << 16
#define USER_MODE_R USER_MODE << 17
#define USER_MODE_S USER_MODE << 18
#define USER_MODE_T USER_MODE << 19
#define USER_MODE_U USER_MODE << 20
#define USER_MODE_V USER_MODE << 21
#define USER_MODE_W USER_MODE << 22
#define USER_MODE_X USER_MODE << 23
#define USER_MODE_Y USER_MODE << 24
#define USER_MODE_Z USER_MODE << 25
#define LOGGED_IN USER_MODE << 29
#define CLOSE_PENDING USER_MODE << 30
#define CLOSING_SERVER USER_MODE << 31
extern const char *umodes;
#define IMMED_SEND 0
#define QUEUE_SEND 1
#define LLOOK_SPLIT 0
#define CHAN_SPLIT 1
#endif /* __server_h_ */

32
include/ssl.h Normal file
View File

@@ -0,0 +1,32 @@
#if defined(HAVE_SSL) && !defined(IN_MODULE)
#ifndef __ssl_h__
#define __ssl_h__
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#ifndef TRUE
#define TRUE 0
#endif
#ifndef FALSE
#define FALSE 1
#endif
#define CHK_NULL(x) if ((x)==NULL) { say("SSL error - NULL data form server"); close_server(refnum, empty_string); return(-1); }
#define CHK_ERR(err,s) if ((err)==-1) { say("SSL prime error - %s",s); close_server(refnum, empty_string); return(-1); }
#define CHK_SSL(err) if ((err)==-1) { say("SSL CHK error - %d %d",err,SSL_get_error(server_list[refnum].ssl_fd, err)); close_server(refnum, empty_string); return(-2); }
void SSL_show_errors(void);
/* Make these what you want for cert & key files */
/*extern SSL_CTX* ctx;*/
/*extern SSL_METHOD *meth;*/
#endif
#endif

49
include/stack.h Normal file
View File

@@ -0,0 +1,49 @@
/*
* stack.h - header for stack.c
*
* written by matthew green
*
* copyright (c) 1993, 1994.
*
* @(#)$Id: stack.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __stack_h_
# define __stack_h_
#include "hook.h"
#include "alias.h"
void stackcmd (char *, char *, char *, char *);
#define STACK_POP 0
#define STACK_PUSH 1
#define STACK_SWAP 2
#define STACK_LIST 3
#define STACK_DO_ALIAS 0x0001
#define STACK_DO_ASSIGN 0x0002
typedef struct AliasStru1
{
char *name; /* name of alias */
char *stuff; /* what the alias is */
char *stub; /* the file its stubbed to */
int mark; /* used to prevent recursive aliasing */
int global; /* set if loaded from `global' */
void *what; /* pointer to structure */
int struct_type; /* type of structure */
struct AliasStru1 *next; /* pointer to next alias in list */
} Alias1;
typedef struct aliasstacklist1
{
int which;
char *name;
IrcVariable *set;
enum VAR_TYPES var_index;
Alias1 *list;
struct aliasstacklist1 *next;
} AliasStack1;
#endif /* __stack_h_ */

26
include/status.h Normal file
View File

@@ -0,0 +1,26 @@
/*
* status.h: header for status.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: status.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __status_h_
#define __status_h_
void make_status (Window *);
void set_alarm (Window *, char *, int);
char *BX_update_clock (int);
void reset_clock (Window *, char *, int);
void BX_build_status (Window *, char *, int);
int BX_status_update (int);
#define GET_TIME 1
#define RESET_TIME 2
#endif /* __status_h_ */

1245
include/struct.h Normal file

File diff suppressed because it is too large Load Diff

80
include/tcl_bx.h Normal file
View File

@@ -0,0 +1,80 @@
/*
*
* CopyRight Colten Edwards Oct 96
*
*/
#ifndef _IRCTCL_H
#define _IRCTCL_H
int handle_dcc_bot (int, char *);
int handle_tcl_chan (int, char *, char *, char *);
typedef struct {
char *name;
int (*func) ();
int access;
char *help;
} cmd_t;
extern cmd_t C_msg[];
extern cmd_t C_dcc[];
int check_tcl_dcc (char *, char *, char *, int);
void tcl_command (char *, char *, char *, char *);
void tcl_load (char *, char *, char *, char *);
#ifdef WANT_TCL
#include <tcl.h>
extern Tcl_Interp *tcl_interp;
void check_tcl_tand (char *, char *, char *);
void check_tcl_msgm (char *, char *, char *, char *, char *);
void check_tcl_pubm (char *, char *, char *, char *);
int check_tcl_pub (char *, char *, char *, char *);
int check_tcl_msg (char *, char *, char *, char *, char *);
int check_tcl_ctcp (char *, char *, char *, char *, char *, char *);
void check_tcl_join (char *,char *, char *, char *);
int check_tcl_raw (char *, char *);
void check_tcl_rejoin (char *,char *,char *,char *);
void check_tcl_split (char *,char *,char *,char *);
void check_tcl_chat (char *,int, char *);
int check_tcl_ctcr (char *,char *,char *,char *,char *,char *);
void check_tcl_mode (char *,char *,char *,char *,char *);
void check_tcl_kick (char *,char *,char *,char *,char *,char *);
void check_tcl_nick (char *,char *,char *,char *, char *);
void check_tcl_topc (char *,char *,char *,char *,char *);
void check_tcl_sign (char *, char *,char *, char *,char *);
void check_tcl_part (char *, char *, char *, char *);
int check_help_bind (char *);
int check_tcl_input (char *);
int check_on_hook (int, char *);
void check_timers (void);
void check_utimers (void);
void tcl_list_timer (Tcl_Interp *, TimerList *);
int check_on_hook (int, char *);
void add_tcl_vars(void);
void tcl_init (void);
void add_to_tcl(Window *, char *);
void init_public_tcl(Tcl_Interp *);
void init_public_var(Tcl_Interp *);
int Tcl_Invoke(Tcl_Interp *, char *, char *);
#define STDVAR (ClientData cd, Tcl_Interp *irp, int argc, char *argv[])
#define BADARGS(nl,nh,example) \
if ((argc<(nl)) || (argc>(nh))) { \
Tcl_AppendResult(irp,"wrong # args: should be \"",argv[0], \
(example),"\"",NULL); \
return TCL_ERROR; \
}
#endif
#endif

29
include/timer.h Normal file
View File

@@ -0,0 +1,29 @@
/*
* timer.h: header for timer.c
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*/
#ifndef _TIMER_H_
#define _TIMER_H_
/* functions that may be called by others */
extern void timercmd (char *, char *, char *, char *);
extern void ExecuteTimers (void);
extern char *BX_add_timer (int, char *, double, long, int (*) (void *, char *), char *, char *, int, char *);
extern int BX_delete_timer (char *);
extern int get_delete_timer(char *);
extern int kill_timer(char *);
extern void BX_delete_all_timers (void);
extern int timer_exists (char *ref);
extern time_t TimerTimeout (void);
char *tcl_add_timer (TimerList **, long, char *, unsigned long);
int tcl_remove_timer (TimerList **, unsigned long);
int timer_callback_exists(void *);
time_t tclTimerTimeout(time_t);
#define MAGIC_TIMEOUT 100000000
#endif /* _TIMER_H_ */

30
include/translat.h Normal file
View File

@@ -0,0 +1,30 @@
/*
* Global stuff for translation tables.
*
* Tomten, tomten@solace.hsh.se / tomten@lysator.liu.se
*
* @(#)$Id: translat.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __translat_h_
#define __translat_h_
void set_translation (Window *, char *, int);
void enter_digraph (char, char *);
unsigned char get_digraph (unsigned char);
void digraph (char *, char *, char *, char *);
void save_digraphs (FILE *);
extern unsigned char transToClient[256];
extern unsigned char transFromClient[256];
extern char translation;
#define DIG_TABLE_SIZE 256
extern unsigned char dig_table_lo[DIG_TABLE_SIZE];
extern unsigned char dig_table_hi[DIG_TABLE_SIZE];
extern unsigned char dig_table_di[DIG_TABLE_SIZE];
extern char digraph_hit;
extern unsigned char digraph_first;
#endif /* __translat_h_ */

87
include/userlist.h Normal file
View File

@@ -0,0 +1,87 @@
/*
* Userlist functions and definitions.
* Copyright Colten Edwards 1996
*
*/
#ifndef _user_list_h
#define _user_list_h
void add_shit (char *, char *, char *, char *);
void add_user (char *, char *, char *, char *);
void showuserlist (char *, char *, char *, char *);
void change_user (char *, char *, char *, char *);
void savelists (char *, char *, char *, char *);
void add_to_a_list (char *, int, char *, char *, char *, int);
void showlist (NickList *, char *);
UserList *lookup_userlevelc (char *, char *, char *, char *);
UserList *nickinuser (char *, char *);
ShitList *nickinshit (char *, char *);
int find_user_level (char *, char *, char *);
int find_shit_level (char *, char *, char *);
NickList *check_auto (char *, NickList *, ChannelList *);
int check_prot (char *, char *, ChannelList *, BanList *, NickList *);
void check_shit (ChannelList *);
void check_hack (char *, ChannelList *, NickList *, char *);
int check_channel_match (char *, char *);
int delay_check_auto (char *);
extern ShitList *shitlist_list;
extern LameList *lame_list;
extern WordKickList *ban_words;
#define USERLIST_REMOVE 0
#define USERLIST_ADD 1
#define SHITLIST_ADD 11
#define SHITLIST_REMOVE 12
#define ADD_VOICE 0x00000001
#define ADD_OPS 0x00000002
#define ADD_BAN 0x00000004
#define ADD_UNBAN 0x00000008
#define ADD_INVITE 0x00000010
#define ADD_DCC 0x00000020
#define ADD_TCL 0x00000040
#define ADD_IOPS 0x00000080
#define ADD_FLOOD 0x00000100
#define ADD_BOT 0x00000200
#define PROT_REOP 0x00000400
#define PROT_DEOP 0x00000800
#define PROT_KICK 0x00001000
#define PROT_BAN 0x00002000
#define PROT_INVITE 0x00004000
#define USER_FLAG_OPS 0x00008000
#define USER_FLAG_PROT 0x00010000
#define ADD_CTCP 0x00100000
#define ADD_FRIEND (ADD_VOICE|ADD_OPS|ADD_UNBAN|ADD_INVITE)
#define ADD_MASTER (ADD_VOICE|ADD_OPS|ADD_BAN|ADD_UNBAN|ADD_INVITE|ADD_DCC|ADD_FLOOD)
#define ADD_OWNER (ADD_MASTER|ADD_BOT|ADD_CTCP)
#define PROT_ALL (PROT_REOP|PROT_DEOP|PROT_KICK|PROT_BAN|PROT_INVITE)
#define SHIT_NOOP 0x0001
#define SHIT_KICK 0x0002
#define SHIT_KICKBAN 0x0004
#define SHIT_PERMBAN 0x0008
#define SHIT_IGNORE 0x0010
/* user.c functions for dealing with hashed userlist */
UserList *find_bestmatch(char *, char *, char *, char *);
char * convert_flags(unsigned long flags);
UserList *find_userlist(char *, char *, int);
void add_userlist(UserList *);
UserList *next_userlist(UserList *, int *, void **);
void destroy_sorted_userlist(UserList **);
UserList *create_sorted_userlist(void);
char *convert_flags_to_str(unsigned long);
unsigned long convert_str_to_flags(char *);
int change_pass(char *, char *);
#endif

428
include/vars.h Normal file
View File

@@ -0,0 +1,428 @@
/*
* vars.h: header for vars.c
*
* Generated from vars.h.proto automatically by the Makefile
*
* @(#)$Id: vars.h 3 2008-02-25 09:49:14Z keaston $
*/
#ifndef __vars_h_
#define __vars_h_
/* indexes for the irc_variable array */
enum VAR_TYPES {
AINV_VAR,
ALTNICK_VAR,
ALT_CHARSET_VAR,
ALWAYS_SPLIT_BIGGEST_VAR ,
ANNOY_KICK_VAR ,
AOP_VAR ,
APPEND_LOG_VAR,
AUTOKICK_ON_VERSION_VAR,
AUTO_AWAY_VAR,
AUTO_AWAY_TIME_VAR,
AUTO_JOIN_ON_INVITE_VAR,
AUTO_LIMIT_VAR,
AUTO_NSLOOKUP_VAR ,
AUTO_RECONNECT_VAR,
AUTO_REJOIN_VAR ,
AUTO_RESPONSE_VAR,
AUTO_RESPONSE_STR_VAR,
AUTO_UNBAN_VAR,
AUTO_UNMARK_AWAY_VAR ,
AUTO_WHOWAS_VAR ,
BANTIME_VAR,
BEEP_VAR ,
BEEP_ALWAYS_VAR ,
BEEP_MAX_VAR ,
BEEP_ON_MSG_VAR ,
BEEP_WHEN_AWAY_VAR ,
BITCH_VAR,
BITCHX_HELP_VAR,
BLINK_VIDEO_VAR,
BOLD_VIDEO_VAR ,
BOT_LOG_VAR,
BOT_LOGFILE_VAR,
BOT_MODE_VAR ,
BOT_PASSWD_VAR,
BOT_RETURN_VAR,
BOT_TCL_VAR,
CDCC_VAR,
CDCC_FLOOD_AFTER_VAR,
CDCC_FLOOD_RATE_VAR,
CDCC_PROMPT_VAR,
CDCC_SECURITY_VAR,
CD_DEVICE_VAR,
CHANGE_NICK_ON_KILL_VAR,
CHANMODE_VAR,
CHANNEL_NAME_WIDTH_VAR ,
CHECK_BEEP_USERS_VAR ,
CLIENTINFO_VAR ,
CLOAK_VAR ,
CLOCK_VAR ,
CLOCK_24HOUR_VAR ,
CLOCK_FORMAT_VAR,
CLONE_CHECK_VAR,
CLONE_COUNT_VAR,
CMDCHARS_VAR ,
COLOR_VAR,
COMMAND_MODE_VAR ,
COMMENT_BREAKAGE_VAR,
COMPRESS_MODES_VAR,
CONNECT_DELAY_VAR,
CONNECT_TIMEOUT_VAR,
CONTINUED_LINE_VAR ,
CPU_SAVER_AFTER_VAR,
CPU_SAVER_EVERY_VAR,
CTCP_DELAY_VAR,
CTCP_FLOOD_AFTER_VAR,
CTCP_FLOOD_BAN_VAR,
CTCP_FLOOD_PROTECTION_VAR ,
CTCP_FLOOD_RATE_VAR,
CTCP_VERBOSE_VAR,
CTOOLZ_DIR_VAR ,
DCC_AUTOGET_VAR ,
DCC_AUTORENAME_VAR,
DCC_AUTORESUME_VAR,
DCC_BAR_TYPE_VAR,
DCC_BLOCK_SIZE_VAR,
DCC_DLDIR_VAR ,
DCC_FAST_VAR,
DCC_FORCE_PORT_VAR,
DCC_GET_LIMIT_VAR,
DCC_MAX_AUTOGET_SIZE_VAR ,
DCC_QUEUE_LIMIT_VAR,
DCC_SEND_LIMIT_VAR,
DCC_TIMEOUT_VAR,
DCC_ULDIR_VAR,
DCC_USE_GATEWAY_ADDR_VAR,
DEBUG_VAR ,
#if defined(__EMXPM__) || defined(WIN32)
DEFAULT_CODEPAGE_VAR,
#endif
DEFAULT_FONT_VAR,
DEFAULT_MENU_VAR,
DEFAULT_NICK_VAR,
DEFAULT_REASON_VAR ,
DEOPFLOOD_VAR ,
DEOPFLOOD_TIME_VAR,
DEOP_ON_DEOPFLOOD_VAR,
DEOP_ON_KICKFLOOD_VAR,
DETACH_ON_HUP,
DISPATCH_UNKNOWN_COMMANDS_VAR,
DISPLAY_VAR ,
DISPLAY_ANSI_VAR,
DISPLAY_PC_CHARACTERS_VAR,
DOUBLE_STATUS_LINE_VAR,
EIGHT_BIT_CHARACTERS_VAR,
EXEC_PROTECTION_VAR ,
FAKE_SPLIT_PATS_VAR,
FLOATING_POINT_MATH_VAR,
FLOOD_AFTER_VAR ,
FLOOD_KICK_VAR ,
FLOOD_PROTECTION_VAR ,
FLOOD_RATE_VAR ,
FLOOD_USERS_VAR ,
FLOOD_WARNING_VAR ,
FTP_GRAB_VAR,
FULL_STATUS_LINE_VAR ,
HACKING_VAR ,
HACK_OPS_VAR,
HEBREW_TOGGLE_VAR,
HELP_PAGER_VAR ,
HELP_PATH_VAR ,
HELP_PROMPT_VAR ,
HELP_WINDOW_VAR ,
HIDE_PRIVATE_CHANNELS_VAR ,
HIGHLIGHT_CHAR_VAR ,
HIGH_BIT_ESCAPE_VAR,
HISTORY_VAR ,
HOLD_MODE_VAR ,
HOLD_MODE_MAX_VAR ,
HTTP_GRAB_VAR,
IDENT_HACK_VAR,
IDLE_CHECK_VAR,
IGNORE_TIME_VAR,
INDENT_VAR ,
INPUT_ALIASES_VAR ,
INPUT_GLOB_VAR,
INPUT_PROMPT_VAR ,
INSERT_MODE_VAR ,
INVERSE_VIDEO_VAR ,
JOINFLOOD_VAR,
JOINFLOOD_TIME_VAR,
JOIN_NEW_WINDOW_VAR,
JOIN_NEW_WINDOW_TYPE_VAR,
KICKFLOOD_VAR ,
KICKFLOOD_TIME_VAR ,
KICK_IF_BANNED_VAR ,
KICK_ON_DEOPFLOOD_VAR ,
KICK_ON_JOINFLOOD_VAR,
KICK_ON_KICKFLOOD_VAR ,
KICK_ON_NICKFLOOD_VAR ,
KICK_ON_PUBFLOOD_VAR ,
KICK_OPS_VAR ,
LAMEIDENT_VAR,
LAMELIST_VAR,
LASTLOG_VAR ,
LASTLOG_ANSI_VAR ,
LASTLOG_LEVEL_VAR ,
LLOOK_VAR ,
LLOOK_DELAY_VAR ,
LOAD_PATH_VAR ,
LOG_VAR ,
LOGFILE_VAR ,
MAIL_VAR ,
MANGLE_INBOUND_VAR,
MANGLE_LOGFILES_VAR,
MANGLE_OPERLOG_VAR,
MANGLE_OUTBOUND_VAR,
MAX_DEOPS_VAR ,
MAX_IDLEKICKS_VAR ,
MAX_SERVER_RECONNECT_VAR,
MAX_URLS_VAR,
MDI_VAR,
META_STATES_VAR,
MIRCS_VAR,
MODE_STRIPPER_VAR ,
MSGCOUNT_VAR,
MSGLOG_VAR ,
MSGLOGFILE_VAR ,
MSGLOG_LEVEL_VAR,
NAMES_COLUMNS_VAR,
NAT_ADDRESS_VAR,
ND_SPACE_MAX_VAR,
NEW_SERVER_LASTLOG_LEVEL_VAR,
NEXT_SERVER_ON_LOCAL_KILL_VAR,
NICKFLOOD_VAR,
NICKFLOOD_TIME_VAR,
NICKLIST_VAR,
NICKLIST_SORT_VAR,
NICK_COMPLETION_VAR,
NICK_COMPLETION_CHAR_VAR,
NICK_COMPLETION_LEN_VAR,
NICK_COMPLETION_TYPE_VAR,
NOTIFY_VAR,
NOTIFY_HANDLER_VAR,
NOTIFY_INTERVAL_VAR,
NOTIFY_LEVEL_VAR,
NOTIFY_ON_TERMINATION_VAR,
NO_CTCP_FLOOD_VAR,
NO_FAIL_DISCONNECT_VAR,
NUM_BANMODES_VAR,
NUM_KICKS_VAR,
NUM_KILLS_VAR,
NUM_OF_WHOWAS_VAR,
NUM_OPMODES_VAR,
OPER_MODES_VAR,
ORIGNICK_TIME_VAR,
OV_VAR,
PAD_CHAR_VAR,
PING_TYPE_VAR,
PROTECT_CHANNELS_VAR,
PUBFLOOD_VAR,
PUBFLOOD_TIME_VAR,
QUERY_NEW_WINDOW_VAR,
QUERY_NEW_WINDOW_TYPE_VAR,
QUEUE_SENDS_VAR,
RANDOM_LOCAL_PORTS_VAR,
RANDOM_SOURCE_VAR,
REALNAME_VAR,
REVERSE_STATUS_VAR,
SAVEFILE_VAR,
SCREEN_OPTIONS_VAR,
SCRIPT_HELP_VAR,
SCROLLBACK_VAR,
SCROLLBACK_RATIO_VAR,
SCROLL_LINES_VAR,
SEND_AWAY_MSG_VAR,
SEND_CTCP_MSG_VAR,
SEND_IGNORE_MSG_VAR,
SEND_OP_MSG_VAR,
SERVER_GROUPS_VAR,
SERVER_PROMPT_VAR,
SHELL_VAR,
SHELL_FLAGS_VAR,
SHELL_LIMIT_VAR,
SHITLIST_VAR,
SHITLIST_REASON_VAR,
SHOW_AWAY_ONCE_VAR,
SHOW_CHANNEL_NAMES_VAR,
SHOW_END_OF_MSGS_VAR,
SHOW_NUMERICS_VAR,
SHOW_NUMERICS_STR_VAR,
SHOW_STATUS_ALL_VAR,
SHOW_WHO_HOPCOUNT_VAR,
SOCKS_HOST_VAR,
SOCKS_PORT_VAR,
STATUS_AWAY_VAR,
STATUS_CDCCCOUNT_VAR,
STATUS_CHANNEL_VAR,
STATUS_CHANOP_VAR,
STATUS_CLOCK_VAR,
STATUS_CPU_SAVER_VAR,
STATUS_DCCCOUNT_VAR,
STATUS_DOES_EXPANDOS_VAR,
STATUS_FLAG_VAR,
STATUS_FORMAT_VAR,
STATUS_FORMAT1_VAR,
STATUS_FORMAT2_VAR,
STATUS_FORMAT3_VAR,
STATUS_HALFOP_VAR,
STATUS_HOLD_VAR,
STATUS_HOLD_LINES_VAR,
STATUS_INSERT_VAR,
STATUS_LAG_VAR,
STATUS_MAIL_VAR,
STATUS_MODE_VAR,
STATUS_MSGCOUNT_VAR,
STATUS_NICK_VAR,
STATUS_NOTIFY_VAR,
STATUS_NO_REPEAT_VAR,
STATUS_OPER_VAR,
STATUS_OPER_KILLS_VAR,
STATUS_OVERWRITE_VAR,
STATUS_QUERY_VAR,
STATUS_SCROLLBACK_VAR,
STATUS_SERVER_VAR,
STATUS_TOPIC_VAR,
STATUS_UMODE_VAR,
STATUS_USER0_VAR,
STATUS_USER1_VAR,
STATUS_USER10_VAR,
STATUS_USER11_VAR,
STATUS_USER12_VAR,
STATUS_USER13_VAR,
STATUS_USER14_VAR,
STATUS_USER15_VAR,
STATUS_USER16_VAR,
STATUS_USER17_VAR,
STATUS_USER18_VAR,
STATUS_USER19_VAR,
STATUS_USER2_VAR,
STATUS_USER20_VAR,
STATUS_USER21_VAR,
STATUS_USER22_VAR,
STATUS_USER23_VAR,
STATUS_USER24_VAR,
STATUS_USER25_VAR,
STATUS_USER26_VAR,
STATUS_USER27_VAR,
STATUS_USER28_VAR,
STATUS_USER29_VAR,
STATUS_USER3_VAR,
STATUS_USER30_VAR,
STATUS_USER31_VAR,
STATUS_USER32_VAR,
STATUS_USER33_VAR,
STATUS_USER34_VAR,
STATUS_USER35_VAR,
STATUS_USER36_VAR,
STATUS_USER37_VAR,
STATUS_USER38_VAR,
STATUS_USER39_VAR,
STATUS_USER4_VAR,
STATUS_USER5_VAR,
STATUS_USER6_VAR,
STATUS_USER7_VAR,
STATUS_USER8_VAR,
STATUS_USER9_VAR,
STATUS_USERS_VAR,
STATUS_VOICE_VAR,
STATUS_WINDOW_VAR,
SUPPRESS_SERVER_MOTD_VAR,
SWATCH_VAR,
TAB_VAR,
TAB_MAX_VAR,
TIMESTAMP_VAR,
TIMESTAMP_AWAYLOG_HOURLY_VAR,
TIMESTAMP_STRING_VAR,
TRANSLATION_VAR,
UNDERLINE_VIDEO_VAR,
USERLIST_VAR,
USERMODE_VAR,
USER_FLAG_OPS_VAR,
USER_FLAG_PROT_VAR,
USER_INFO_VAR,
#define USERINFO_VAR USER_INFO_VAR
WINDOW_DESTROY_PART_VAR,
WINDOW_QUIET_VAR,
WORD_BREAK_VAR,
XTERM_VAR,
XTERM_OPTIONS_VAR,
XTERM_TITLE_VAR,
_CDCC_CLOSE_IDLE_SENDS_TIME_VAR,
_CDCC_MINSPEED_TIME_VAR,
_CDCC_PACKS_OFFERED_VAR,
NUMBER_OF_VARIABLES
};
int do_boolean (char *, int *);
void setcmd (char *, char *, char *, char *);
int BX_get_int_var (enum VAR_TYPES);
int get_dllint_var (char *);
char *BX_get_string_var (enum VAR_TYPES);
char *get_dllstring_var (char *);
char *wget_string_var (Window *, enum VAR_TYPES);
void wset_string_var (Window *, enum VAR_TYPES, char *);
void BX_set_int_var (enum VAR_TYPES, unsigned int);
void BX_set_string_var (enum VAR_TYPES, char *);
void set_dllint_var (char *, unsigned int);
void set_dllstring_var (char *, char *);
void init_variables (void);
char *make_string_var (const char *);
void set_highlight_char (Window *, char *, int);
int charset_size (void);
void save_variables (FILE *, int);
void set_var_value (int, char *, IrcVariableDll *);
void save_set (FILE *);
extern char *var_settings[];
extern int loading_global;
void savebitchx_variables (FILE *);
void reinit_autoresponse (Window *, char *, int);
void clear_sets (void);
void clear_bindings (void);
int window_set_var (Window *, char *);
void init_window_variables (Window *);
#include "cset.h"
/* var_settings indexes also used in display.c for highlights */
#define OFF 0
#define ON 1
#define TOGGLE 2
/* the types of IrcVariables */
#define BOOL_TYPE_VAR 0
#define CHAR_TYPE_VAR 1
#define INT_TYPE_VAR 2
#define STR_TYPE_VAR 3
#define SET_TYPE_VAR 4
#define VF_NODAEMON 0x0001
#define VF_EXPAND_PATH 0x0002
#define VIF_CHANGED 0x01
#define VIF_GLOBAL 0x02
#define VIF_BITCHX 0x04
#define VIF_PENDING 0x08
#define DEBUG_COMMANDS 0x0001
#define DEBUG_EXPANSIONS 0x0002
#define DEBUG_FUNCTIONS 0x0004
#define DEBUG_TCL 0x0008
#define DEBUG_CMDALIAS 0x0010
#define DEBUG_HOOK 0x0020
#define DEBUG_VARIABLE 0x0040
#define DEBUG_FUNC 0x0080
int parse_mangle (char *, int, char **);
#endif /* __vars_h_ */

84
include/who.h Normal file
View File

@@ -0,0 +1,84 @@
/*
* who.h -- header info for the WHO, ISON, and USERHOST queues.
* Copyright 1996 EPIC Software Labs
*/
#ifndef __who_h__
#define __who_h__
void clean_server_queues (int);
/* WHO queue */
typedef struct WhoEntryT
{
int dirty;
int piggyback;
int who_mask;
char *who_target;
char *who_name;
char *who_host;
char *who_server;
char *who_nick;
char *who_real;
char *who_stuff;
char *who_end;
char *who_buff;
char *who_args;
struct WhoEntryT *next;
void (*line) (struct WhoEntryT *, char *, char **);
void (*end) (struct WhoEntryT *, char *, char **);
} WhoEntry;
BUILT_IN_COMMAND(whocmd);
void BX_whobase (char *, void (*)(WhoEntry *, char *, char **), void (*)(WhoEntry *, char *, char **), char *, ...);
void whoreply (char *, char **);
void who_end (char *, char **);
/* ISON queue */
typedef struct IsonEntryT
{
char *ison_asked;
char *ison_got;
struct IsonEntryT *next;
void (*line) (char *, char *);
} IsonEntry;
BUILT_IN_COMMAND(isoncmd);
void BX_isonbase (char *args, void (*line) (char *, char *));
void ison_returned (char *, char **);
/* USERHOST queue */
typedef struct UserhostItemT
{
char * nick;
int oper;
int connected;
int away;
char * user;
char * host;
} UserhostItem;
typedef struct UserhostEntryT
{
char *userhost_asked;
char *text;
struct UserhostEntryT *next;
void (*func) (UserhostItem *, char *, char *);
} UserhostEntry;
BUILT_IN_COMMAND(userhostcmd);
BUILT_IN_COMMAND(useripcmd);
BUILT_IN_COMMAND(usripcmd);
void BX_userhostbase (char *arg, void (*line) (UserhostItem *, char *, char *), int, char *, ...);
void userhost_returned (char *, char **);
void userhost_cmd_returned (UserhostItem *, char *, char *);
#endif

63
include/whowas.h Normal file
View File

@@ -0,0 +1,63 @@
#ifndef _WhoWas_h
#define _WhoWas_h
#define WHOWAS_USERLIST_MAX 300
#define WHOWAS_REG_MAX 500
#define WHOWAS_CHAN_MAX 20
#include "hash.h"
typedef struct _whowaschan_str {
struct _whowaschan_str *next;
char *channel;
int refnum;
ChannelList *channellist;
time_t time;
} WhowasChanList;
typedef struct _whowaswrapchan_str {
HashEntry NickListTable[WHOWASLIST_HASHSIZE];
} WhowasWrapChanList;
typedef struct _whowas_str {
struct _whowas_str *next;
int has_ops; /* true is user split away with opz */
char *channel; /* name of channel */
time_t time; /* time of split/leave */
char *server1;
char *server2;
NickList *nicklist; /* pointer to nicklist */
ShitList *shitlist; /* pointer to shitlist */
ChannelList *channellist;
} WhowasList;
typedef struct _whowas_wrap_str {
unsigned long total_hits;
unsigned long total_links;
unsigned long total_unlinks;
HashEntry NickListTable[WHOWASLIST_HASHSIZE];
} WhowasWrapList;
WhowasList *check_whowas_buffer (char *, char *, char *);
WhowasList *check_whowas_nick_buffer (char *, char *, int);
WhowasList *check_whosplitin_buffer (char *, char *, char *, int);
void add_to_whowas_buffer (NickList *, char *, char *, char *);
void add_to_whosplitin_buffer (NickList *, char *, char *, char *);
int remove_oldest_whowas (WhowasWrapList *, time_t, int);
void clean_whowas_list (void);
void sync_whowas_adduser (UserList *);
void sync_whowas_unuser (UserList *);
void sync_whowas_addshit (ShitList *);
void sync_whowas_unshit (ShitList *);
WhowasChanList *check_whowas_chan_buffer (char *, int, int);
void add_to_whowas_chan_buffer (ChannelList *);
int remove_oldest_chan_whowas (WhowasChanList **, time_t, int);
void clean_whowas_chan_list (void);
void show_whowas (void);
void show_wholeft (char *);
extern WhowasWrapList whowas_splitin_list;
#endif

625
include/winbitchx.h Normal file
View File

@@ -0,0 +1,625 @@
#ifndef WIN_BitchX_h
#define WIN_BitchX_h
#include <windows.h>
/* prototypes */
void VTActivate();
void ChangeTitle();
void SwitchMenu();
void SwitchTitleBar();
void OpenHelp(HWND HWin, UINT Command, DWORD Data);
void ResetTerminal();
void ResetCharSet();
void HideStatusLine();
void ChangeTerminalSize(int Nx, int Ny);
int VTParse();
void EnableDlgItem(HWND HDlg, int FirstId, int LastId);
void DisableDlgItem(HWND HDlg, int FirstId, int LastId);
void ShowDlgItem(HWND HDlg, int FirstId, int LastId);
void SetRB(HWND HDlg, int R, int FirstId, int LastId);
void GetRB(HWND HDlg, LPWORD R, int FirstId, int LastId);
void SetDlgNum(HWND HDlg, int id_Item, LONG Num);
void SetDlgPercent(HWND HDlg, int id_Item, LONG a, LONG b);
/*void SetDropDownList(HWND HDlg, int Id_Item, PCHAR far *List, int nsel);*/
LONG GetCurSel(HWND HDlg, int Id_Item);
void InitDisp();
void EndDisp();
void DispReset();
void DispConvWinToScreen
(int Xw, int Yw, int *Xs, int *Ys, LPBOOL Right);
void SetLogFont();
void ChangeFont();
void ResetIME();
void ChangeCaret();
void CaretOn();
void CaretOff();
void DispDestroyCaret();
BOOL IsCaretOn();
void DispEnableCaret(BOOL On);
BOOL IsCaretEnabled();
void DispSetCaretWidth(BOOL DW);
void DispChangeWinSize(int Nx, int Ny);
void ResizeWindow(int x, int y, int w, int h, int cw, int ch);
void PaintWindow(HDC PaintDC, RECT PaintRect, BOOL fBkGnd,
int* Xs, int* Ys, int* Xe, int* Ye);
void DispEndPaint();
void DispClearWin();
void DispChangeBackground();
void DispChangeWin();
void DispInitDC();
void DispReleaseDC();
void DispSetupDC(BYTE Attr, BYTE Attr2, BOOL Reverse);
void DispStr(PCHAR Buff, int Count, int Y, int* X);
void DispEraseCurToEnd(int YEnd);
void DispEraseHomeToCur(int YHome);
void DispEraseCharsInLine(int XStart, int Count);
BOOL DispDeleteLines(int Count, int YEnd);
BOOL DispInsertLines(int Count, int YEnd);
BOOL IsLineVisible(int* X, int* Y);
void AdjustScrollBar();
void DispScrollToCursor(int CurX, int CurY);
void DispScrollNLines(int Top, int Bottom, int Direction);
void DispCountScroll();
void DispUpdateScroll();
void DispScrollHomePos();
void DispAutoScroll(POINT p);
void DispHScroll(int Func, int Pos);
void DispVScroll(int Func, int Pos);
void DispSetupFontDlg();
void DispRestoreWinSize();
void DispSetWinPos();
void DispSetActive(BOOL ActiveFlag);
/* Character attribute bit masks */
#define AttrDefault 0x00
#define AttrDefault2 0x00
#define AttrBold 0x01
#define AttrUnder 0x02
#define AttrSpecial 0x04
#define AttrFontMask 0x07
#define AttrBlink 0x08
#define AttrReverse 0x10
#define AttrKanji 0x80
extern int WinWidth, WinHeight;
extern HFONT VTFont[AttrFontMask+1];
extern int FontHeight, FontWidth, ScreenWidth, ScreenHeight;
extern BOOL AdjustSize, DontChangeSize;
extern int CursorX, CursorY;
extern int WinOrgX, WinOrgY, NewOrgX, NewOrgY;
extern int NumOfLines, NumOfColumns;
extern int PageStart, BuffEnd;
#define SCROLL_BOTTOM 1
#define SCROLL_LINEDOWN 2
#define SCROLL_LINEUP 3
#define SCROLL_PAGEDOWN 4
#define SCROLL_PAGEUP 5
#define SCROLL_POS 6
#define SCROLL_TOP 7
/* Parsing modes */
#define ModeFirst 0
#define ModeESC 1
#define ModeDCS 2
#define ModeDCUserKey 3
#define ModeSOS 4
#define ModeCSI 5
#define ModeXS 6
#define ModeDLE 7
#define ModeCAN 8
extern HWND HVTWin;
extern HWND HTEKWin;
extern int ActiveWin; /* IdVT, IdTEK */
extern int TalkStatus; /* IdTalkKeyb, IdTalkCB, IdTalkTextFile */
extern BOOL KeybEnabled; /* keyboard switch */
extern BOOL Connecting;
/* 'help' button on dialog box */
extern WORD MsgDlgHelp;
extern LONG HelpId;
/*extern TTTSet ts;
extern TComVar cv;*/
/* pointers to window objects */
extern void* pVTWin;
extern void* pTEKWin;
/* instance handle */
extern HINSTANCE hInst;
extern int SerialNo;
#define IdBreakTimer 1
#define IdDelayTimer 2
#define IdProtoTimer 3
#define IdDblClkTimer 4
#define IdScrollTimer 5
#define IdComEndTimer 6
#define IdCaretTimer 7
#define IdPrnStartTimer 8
#define IdPrnProcTimer 9
/* Window Id */
#define IdVT 1
#define IdTEK 2
/* Talker mode */
#define IdTalkKeyb 0
#define IdTalkCB 1
#define IdTalkFile 2
#define IdTalkQuiet 3
/* Character sets */
#define IdASCII 0
#define IdKatakana 1
#define IdKanji 2
#define IdSpecial 3
/* Color attribute bit masks */
#define Attr2Fore 0x08
#define Attr2ForeMask 0x07
#define Attr2Back 0x80
#define Attr2BackMask 0x70
#define SftAttrBack 4
/* Color codes */
#define IdBack 0
#define IdRed 1
#define IdGreen 2
#define IdYellow 3
#define IdBlue 4
#define IdMagenta 5
#define IdCyan 6
#define IdFore 7
/* Kermit function id */
#define IdKmtReceive 1
#define IdKmtGet 2
#define IdKmtSend 3
#define IdKmtFinish 4
/* XMODEM function id */
#define IdXReceive 1
#define IdXSend 2
/* ZMODEM function id */
#define IdZReceive 1
#define IdZSend 2
#define IdZAuto 3
/* B-Plus function id */
#define IdBPReceive 1
#define IdBPSend 2
#define IdBPAuto 3
/* Quick-VAN function id */
#define IdQVReceive 1
#define IdQVSend 2
#define HostNameMaxLength 80
/* internal WM_USER messages */
#define WM_USER_ACCELCOMMAND WM_USER+1
#define WM_USER_CHANGEMENU WM_USER+2
#define WM_USER_CLOSEIME WM_USER+3
#ifdef TERATERM32
#define WM_USER_COMMNOTIFY WM_USER+4
#else
#define WM_USER_COMMNOTIFY WM_COMMNOTIFY
#endif
#define WM_USER_COMMOPEN WM_USER+5
#define WM_USER_COMMSTART WM_USER+6
#define WM_USER_DLGHELP2 WM_USER+7
#define WM_USER_GETHOST WM_USER+8
#define WM_USER_FTCANCEL WM_USER+9
#define WM_USER_PROTOCANCEL WM_USER+10
#define WM_USER_CHANGETBAR WM_USER+11
#define WM_USER_KEYCODE WM_USER+12
#define WM_USER_GETSERIALNO WM_USER+13
#define WM_USER_DDEREADY WM_USER+21
#define WM_USER_DDECMNDEND WM_USER+22
#define WM_USER_DDECOMREADY WM_USER+23
#define WM_USER_DDEEND WM_USER+24
/* port type ID */
#define IdTCPIP 1
#define IdSerial 2
#define IdFile 3
/* XMODEM option */
#define XoptCheck 1
#define XoptCRC 2
#define Xopt1K 3
/* Language */
#define IdEnglish 1
#define IdJapanese 2
#define IdRussian 3
// log flags (used in ts.LogFlag)
#define LOG_TEL 1
#define LOG_KMT 2
#define LOG_X 4
#define LOG_Z 8
#define LOG_BP 16
#define LOG_QV 32
// file transfer flags (used in ts.FTFlag)
#define FT_ZESCCTL 1
#define FT_ZAUTO 2
#define FT_BPESCCTL 4
#define FT_BPAUTO 8
#define FT_RENAME 16
// menu flags (used in ts.MenuFlag)
#define MF_NOSHOWMENU 1
#define MF_NOPOPUP 2
#define MF_NOLANGUAGE 4
#define MF_SHOWWINMENU 8
// Terminal flags (used in ts.TermFlag)
#define TF_FIXEDJIS 1
#define TF_AUTOINVOKE 2
#define TF_CTRLINKANJI 8
#define TF_ALLOWWRONGSEQUENCE 16
#define TF_ACCEPT8BITCTRL 32
#define TF_ENABLESLINE 64
#define TF_BACKWRAP 128
// ANSI color flags (used in ts.ColorFlag)
#define CF_FULLCOLOR 1
#define CF_USETEXTCOLOR 2
// port flags (used in ts.PortFlag)
#define PF_CONFIRMDISCONN 1
#define PF_BEEPONCONNECT 2
#define IdCR 1
#define IdCRLF 2
/* Terminal ID */
#define IdVT100 1
#define IdVT100J 2
#define IdVT101 3
#define IdVT102 4
#define IdVT102J 5
#define IdVT220J 6
#define IdVT282 7
#define IdVT320 8
#define IdVT382 9
/* Kanji Code ID */
#define IdSJIS 1
#define IdEUC 2
#define IdJIS 3
// Russian code sets
#define IdWindows 1
#define IdKOI8 2
#define Id866 3
#define IdISO 4
/* KanjiIn modes */
#define IdKanjiInA 1
#define IdKanjiInB 2
/* KanjiOut modes */
#define IdKanjiOutB 1
#define IdKanjiOutJ 2
#define IdKanjiOutH 3
#define TermWidthMax 300
#define TermHeightMax 200
/* Cursor shapes */
#define IdBlkCur 1
#define IdVCur 2
#define IdHCur 3
#define IdBS 1
#define IdDEL 2
/* Serial port ID */
#define IdCOM1 1
#define IdCOM2 2
#define IdCOM3 3
#define IdCOM4 4
/* Baud rate ID */
#define IdBaud110 1
#define IdBaud300 2
#define IdBaud600 3
#define IdBaud1200 4
#define IdBaud2400 5
#define IdBaud4800 6
#define IdBaud9600 7
#define IdBaud14400 8
#define IdBaud19200 9
#define IdBaud38400 10
#define IdBaud57600 11
#define IdBaud115200 12
/* Parity ID */
#define IdParityEven 1
#define IdParityOdd 2
#define IdParityNone 3
/* Data bit ID */
#define IdDataBit7 1
#define IdDataBit8 2
/* Stop bit ID */
#define IdStopBit1 1
#define IdStopBit2 2
/* Flow control ID */
#define IdFlowX 1
#define IdFlowHard 2
#define IdFlowNone 3
/* GetHoerm internal key codes */
#define IdUp 1
#define IdDown 2
#define IdRight 3
#define IdLeft 4
#define Id0 5
#define Id1 6
#define Id2 7
#define Id3 8
#define Id4 9
#define Id5 10
#define Id6 11
#define Id7 12
#define Id8 13
#define Id9 14
#define IdMinus 15
#define IdComma 16
#define IdPeriod 17
#define IdEnter 18
#define IdPF1 19
#define IdPF2 20
#define IdPF3 21
#define IdPF4 22
#define IdFind 23
#define IdInsert 24
#define IdRemove 25
#define IdSelect 26
#define IdPrev 27
#define IdNext 28
#define IdHold 29
#define IdPrint 30
#define IdBreak 31
#define IdF6 32
#define IdF7 33
#define IdF8 34
#define IdF9 35
#define IdF10 36
#define IdF11 37
#define IdF12 38
#define IdF13 39
#define IdF14 40
#define IdHelp 41
#define IdDo 42
#define IdF17 43
#define IdF18 44
#define IdF19 45
#define IdF20 46
#define IdUDK6 47
#define IdUDK7 48
#define IdUDK8 49
#define IdUDK9 50
#define IdUDK10 51
#define IdUDK11 52
#define IdUDK12 53
#define IdUDK13 54
#define IdUDK14 55
#define IdUDK15 56
#define IdUDK16 57
#define IdUDK17 58
#define IdUDK18 59
#define IdUDK19 60
#define IdUDK20 61
#define IdXF1 62
#define IdXF2 63
#define IdXF3 64
#define IdXF4 65
#define IdXF5 66
#define IdCmdEditCopy 67
#define IdCmdEditPaste 68
#define IdCmdEditPasteCR 69
#define IdCmdEditCLS 70
#define IdCmdEditCLB 71
#define IdCmdCtrlOpenTEK 72
#define IdCmdCtrlCloseTEK 73
#define IdCmdLineUp 74
#define IdCmdLineDown 75
#define IdCmdPageUp 76
#define IdCmdPageDown 77
#define IdCmdBuffTop 78
#define IdCmdBuffBottom 79
#define IdCmdNextWin 80
#define IdCmdPrevWin 81
#define IdCmdLocalEcho 82
#define IdUser1 83
#define NumOfUserKey 99
#define IdKeyMax IdUser1+NumOfUserKey-1
// key code for macro commands
#define IdCmdDisconnect 1000
#define IdCmdLoadKeyMap 1001
#define IdCmdRestoreSetup 1002
#define KeyStrMax 1023
// (user) key type IDs
#define IdBinary 0 // transmit text without any modification
#define IdText 1 // transmit text with new-line & DBCS conversions
#define IdMacro 2 // activate macro
#define IdCommand 3 // post a WM_COMMAND message
/* Control Characters */
#define NUL 0x00
#define SOH 0x01
#define STX 0x02
#define ETX 0x03
#define EOT 0x04
#define ENQ 0x05
#define ACK 0x06
#define BEL 0x07
#define BS 0x08
#define HT 0x09
#define LF 0x0A
#define VT 0x0B
#define FF 0x0C
#define CR 0x0D
#define SO 0x0E
#define SI 0x0F
#define DLE 0x10
#define DC1 0x11
#define XON 0x11
#define DC2 0x12
#define DC3 0x13
#define XOFF 0x13
#define DC4 0x14
#define NAK 0x15
#define SYN 0x16
#define ETB 0x17
#define CAN 0x18
#define EM 0x19
#define SUB 0x1A
#define ESC 0x1B
#define FS 0x1C
#define GS 0x1D
#define RS 0x1E
#define US 0x1F
#define SP 0x20
#define DEL 0x7F
#define IND 0x84
#define NEL 0x85
#define SSA 0x86
#define ESA 0x87
#define HTS 0x88
#define HTJ 0x89
#define VTS 0x8A
#define PLD 0x8B
#define PLU 0x8C
#define RI 0x8D
#define SS2 0x8E
#define SS3 0x8F
#define DCS 0x90
#define PU1 0x91
#define PU2 0x92
#define STS 0x93
#define CCH 0x94
#define MW 0x95
#define SPA 0x96
#define EPA 0x97
/*#define SOS 0x98*/
#define CSI 0x9B
#define ST 0x9C
#define OSC 0x9D
#define PM 0x9E
#define APC 0x9F
#define InBuffSize 1024
#define OutBuffSize 1024
#define ID_FILE 0
#define ID_EDIT 1
#define ID_SETUP 2
#define ID_CONTROL 3
#define ID_HELPMENU 4
#define ID_WINDOW_1 50801
#define ID_WINDOW_WINDOW 50810
#define ID_TRANSFER 4
#define ID_SHOWMENUBAR 995
#define BuffXMax 300
#define BuffYMax 100000
#define BuffSizeMax 8000000
HDC PrnBox(HWND HWin, LPBOOL Sel);
BOOL PrnStart(LPSTR DocumentName);
void PrnStop();
#define IdPrnCancel 0
#define IdPrnScreen 1
#define IdPrnSelectedText 2
#define IdPrnScrollRegion 4
#define IdPrnFile 8
int VTPrintInit(int PrnFlag);
void PrnSetAttr(BYTE Attr, BYTE Attr2);
void PrnOutText(PCHAR Buff, int Count);
void PrnNewLine();
void VTPrintEnd();
void PrnFileDirectProc();
void PrnFileStart();
void OpenPrnFile();
void ClosePrnFile();
void WriteToPrnFile(BYTE b, BOOL Write);
void InitBuffer();
void LockBuffer();
void UnlockBuffer();
void FreeBuffer();
void BuffReset();
void BuffScroll(int Count, int Bottom);
void BuffInsertSpace(int Count);
void BuffEraseCurToEnd();
void BuffEraseHomeToCur();
void BuffInsertLines(int Count, int YEnd);
void BuffEraseCharsInLine(int XStart, int Count);
void BuffDeleteLines(int Count, int YEnd);
void BuffDeleteChars(int Count);
void BuffEraseChars(int Count);
void BuffFillWithE();
void BuffDrawLine(BYTE Attr, BYTE Attr2, int Direction, int C);
void BuffEraseBox(int XStart, int YStart, int XEnd, int YEnd);
void BuffCBCopy(BOOL Table);
void BuffPrint(BOOL ScrollRegion);
void BuffDumpCurrentLine(BYTE TERM);
void BuffPutChar(BYTE b, BYTE Attr, BYTE Attr2, BOOL Insert);
void BuffPutKanji(WORD w, BYTE Attr, BYTE Attr2, BOOL Insert);
void BuffUpdateRect(int XStart, int YStart, int XEnd, int YEnd);
void UpdateStr();
void MoveCursor(int Xnew, int Ynew);
void MoveRight();
void BuffSetCaretWidth();
void BuffScrollNLines(int n);
void BuffClearScreen();
void BuffUpdateScroll();
void CursorUpWithScroll();
void BuffDblClk(int Xw, int Yw);
void BuffTplClk(int Yw);
void BuffStartSelect(int Xw, int Yw, BOOL Box);
void BuffChangeSelect(int Xw, int Yw, int NClick);
void BuffEndSelect();
void BuffChangeWinSize(int Nx, int Ny);
void BuffChangeTerminalSize(int Nx, int Ny);
void ChangeWin();
void ClearBuffer();
void SetTabStop();
void MoveToNextTab();
void ClearTabStop(int Ps);
void ShowStatusLine(int Show);
PCHAR CBOpen(LONG MemSize);
void CBClose();
void CBStartPaste(HWND HWin, BOOL AddCR,
int BuffSize, PCHAR DataPtr, int DataSize);
void CBSend();
void CBEndPaste();
#endif

176
include/window.h Normal file
View File

@@ -0,0 +1,176 @@
/*
* window.h: header file for window.c
*
* Written By Michael Sandrof
*
* Copyright(c) 1990
*
* See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT
*
* @(#)$Id: window.h 26 2008-04-30 13:57:56Z keaston $
*/
#ifndef __window_h_
#define __window_h_
#include "irc_std.h"
#include "lastlog.h"
/* used by the update flag to determine what needs updating */
#define REDRAW_DISPLAY_FULL 1
#define REDRAW_DISPLAY_FAST 2
#define UPDATE_STATUS 4
#define REDRAW_STATUS 8
#define LT_UNLOGGED 0
#define LT_LOGHEAD 1
#define LT_LOGTAIL 2
/* var_settings indexes */
#define OFF 0
#define ON 1
#define TOGGLE 2
#define WINDOW_NO_SERVER -1
#define WINDOW_DLL -2
#define WINDOW_SERVER_CLOSED -3
Window *BX_new_window (struct ScreenStru *);
void BX_delete_window (Window *);
void BX_add_to_invisible_list (Window *);
Window *BX_add_to_window_list (struct ScreenStru *, Window *);
void BX_remove_from_window_from_screen (Window *);
void BX_recalculate_window_positions (struct ScreenStru *);
void BX_redraw_all_windows (void);
void BX_recalculate_windows (struct ScreenStru *);
void BX_rebalance_windows (struct ScreenStru *);
void BX_update_all_windows (void);
void BX_set_current_window (Window *);
void BX_hide_window (Window *);
void BX_swap_last_window (char, char *);
void BX_next_window (char, char *);
void BX_swap_next_window (char, char *);
void BX_previous_window (char, char *);
void BX_swap_previous_window (char, char *);
void BX_back_window (char, char *);
Window *BX_get_window_by_refnum (unsigned);
Window *BX_get_window_by_name (const char *);
char *BX_get_refnum_by_window (const Window *);
int is_window_visible (char *);
void BX_update_window_status (Window *, int);
void BX_update_all_status (Window *, char *, int);
void BX_set_prompt_by_refnum (unsigned, char *);
char *BX_get_prompt_by_refnum (unsigned);
char *BX_get_target_by_refnum (unsigned);
void BX_set_query_nick (char *, char *, char *);
int BX_is_current_channel (char *, int, int);
const char *BX_set_current_channel_by_refnum (unsigned, char *);
char *BX_get_current_channel_by_refnum (unsigned);
int BX_is_bound_to_window (const Window *, const char *);
Window *BX_get_window_bound_channel (const char *);
int BX_is_bound_anywhere (const char *);
int BX_is_bound (const char *, int);
void BX_unbind_channel (const char *, int);
char *BX_get_bound_channel (Window *);
int BX_get_window_server (unsigned);
void BX_set_window_server (int, int, int);
int windows_connected_to_server (int);
void BX_set_level_by_refnum (unsigned, unsigned long);
void BX_message_to (unsigned long);
#if 0
void save_message_from (char **, unsigned long *);
void restore_message_from (char *, unsigned long);
void message_from (char *, unsigned long);
int message_from_level (unsigned long);
#endif
void BX_set_display_target (const char *, unsigned long);
void set_display_target_by_winref (unsigned int);
void BX_set_display_target_by_desc (char *);
void BX_reset_display_target (void);
void BX_save_display_target (const char **, unsigned long *);
void BX_restore_display_target (const char *, unsigned long);
void BX_clear_all_windows (int, int);
void BX_clear_window_by_refnum (unsigned);
void set_scroll (Window *, char *, int);
void BX_set_scroll_lines (Window *, char *, int);
void BX_set_continued_lines (Window *, char *, int);
unsigned BX_current_refnum (void);
int BX_number_of_windows_on_screen (Window *);
void delete_display_line (Display *);
Display *new_display_line (Display *);
void BX_scrollback_backwards_lines (int);
void BX_scrollback_forwards_lines (int);
void BX_scrollback_backwards (char, char *);
void BX_scrollback_forwards (char, char *);
void BX_scrollback_end (char, char *);
void BX_scrollback_start (char, char *);
void BX_set_hold_mode (Window *, int, int);
void BX_unstop_all_windows (char, char *);
void BX_reset_line_cnt (Window *, char *, int);
void BX_toggle_stop_screen (char, char *);
void BX_flush_everything_being_held (Window *);
int BX_unhold_a_window (Window *);
char *BX_get_target_cmd_by_refnum (u_int);
void BX_recalculate_window_cursor (Window *);
int BX_is_window_name_unique (char *);
int BX_get_visible_by_refnum (char *);
void BX_resize_window (int, Window *, int);
Window *window_list (Window *, char **, char *);
void BX_move_window (Window *, int);
void BX_show_window (Window *);
int BX_traverse_all_windows (Window **);
Window *BX_get_window_by_desc (const char *);
char *BX_get_nicklist_by_window (Window *); /* XXX */
void BX_set_scrollback_size (Window *, char *, int);
Window *window_query (Window *, char **, char *);
int BX_unhold_windows (void);
void free_window (Window *);
Window *BX_get_window_target_by_desc (char *);
BUILT_IN_COMMAND(windowcmd);
char *BX_get_status_by_refnum (unsigned , unsigned);
void BX_unclear_window_by_refnum (unsigned);
void BX_clear_scrollback (Window *);
void BX_clear_window (Window *window);
void BX_repaint_window (Window *, int, int);
void BX_remove_window_from_screen (Window *);
void BX_set_screens_current_window (Screen *, Window *);
void BX_make_window_current (Window *);
void BX_make_window_current_by_refnum (int);
void BX_free_formats (Window *);
void BX_goto_window (Screen *, int);
void BX_update_window_status_all (void);
void BX_window_check_servers (int);
int windows_connected_to_server (int);
void window_change_server (int, int);
void make_window_current_by_winref (int);
void make_window_current_by_desc (char *);
int get_winref_by_desc (const char *);
int get_current_winref (void);
void make_to_window_by_desc (char *);
Window *is_querying (char *);
void open_window (char *);
void close_window (char *);
void win_create(int, int);
void BX_change_window_server (int, int);
unsigned long message_from_level (unsigned long);
extern Window *invisible_list;
extern unsigned long who_level;
extern int in_window_command;
extern unsigned int window_display;
extern Window *target_window;
extern Window *current_window;
extern void *default_output_function;
extern int status_update_flag;
#define BUILT_IN_WINDOW(x) Window *x (Window *window, char **args, char *usage)
BUILT_IN_WINDOW(window_server);
#define WINDOW_NOTIFY ((unsigned) 0x0001)
#define WINDOW_NOTIFIED ((unsigned) 0x0002)
#endif /* __window_h_ */