/*
   prototypes!  for every function used outside its own module
   (i guess i'm not very modular, cos there are a LOT of these.)
*/
/*
   This file is part of the eggdrop source code
   copyright (c) 1997 Robey Pointer
   and is distributed according to the GNU general public license.
   For full details, read the top of 'main.c' or the file called
   COPYING that was distributed with this code.
*/


/* blowfish.c */
void init_blowfish();
int expmem_blowfish();
void encrypt_pass();
void debug_blowfish();
char *encrypt_string();
char *decrypt_string();

/* chan.c */
void log_chans();
void tell_chan_info();
char *getchanmode();
void tell_verbose_chan_info();
void tell_verbose_status();
void recheck_ops();
void recheck_channel();
void recheck_channels();
void reset_chan_info();
void resetbans();
int kill_chanban();
int kill_chanban_name();
void tell_chanbans();
void newban();
int killban();
int isbanned();
void kick_match_since();
void kick_match_ban();
int add_chan_user();
int add_bot_hostmask();
void gotjoin();
void gotpart();
void got251();
void got315();
void got324();
void got331();
void got332();
void got352();
void got367();
void got368();
void got405();
void got471();
void got473();
void got474();
void got475();
void gotquit();
void gotnick();
void gotkick();
void gotinvite();
void gottopic();
void show_all_info();
void user_kickban();
void user_kick();
void give_op();
void give_deop();
void check_idle_kick();
void check_expired_splits();
void check_for_split();
void check_expired_chanbans();

/* chanprog.c */
int expmem_chanprog();
char *masktype();
char *maskname();
void clearq();
void take_revenge();
void wipe_serverlist();
void next_server();
void add_server();
void tell_servers();
void tell_settings();
int logmodes();
void reaffirm_owners();
void rehash();
void reload();
void chanprog();
void get_first_server();
void got001();
unsigned long add_timer();
int remove_timer();
void list_timers();
void check_timers();
void check_utimers();
void wipe_timers();

/* chanset.c */
int any_ops();
void init_channel();
int expmem_chan();
void clear_channel();
void clear_channels();
void set_key();
void newly_chanop();
int defined_channel();
int active_channel();
int me_op();
int member_op();
int member_voice();
int ischanmember();
int is_split();
int channel_hidden();
int channel_optopic();
void clear_chanlist();
void set_chanlist();
void kill_bogus_bans();
void update_idle();
void getchanhost();
int hand_on_chan();
int killmember();
void check_lonely_channel();
void check_lonely_channels();
int killchanset();
void addchanset();
void getchanlist();
int write_chanbans();
void restore_chanban();

/* cmds.c */
int check_dcc_attrs();
int sanity_check();

/* dcc.c */
void dcc_activity();
void eof_dcc();

/* dccutil.c */
int expmem_dccutil();
void dprintf();
void tandout();
void chatout();
void chanout();
void chanout2();
void shareout();
void tandout_but();
void chatout_but();
void chanout_but();
void chanout2_but();
void shareout_but();
void tell_who();
void remote_tell_who();
void answer_local_whom();
void answer_whom();
void dcc_chatter();
void lostdcc();
void makepass();
void tell_dcc();
void not_away();
void set_away();
void set_files();
void set_fork();
void set_tand();
void set_chat();
void set_xfer();
void set_relay();
void set_new_relay();
void set_script();
void get_xfer_ptr();
void get_chat_ptr();
void get_file_ptr();
void check_expired_dcc();

/* filedb.c */
long findempty();
FILE *filedb_open();
void filedb_close();
void filedb_add();
void filedb_ls();
void remote_filereq();
void filedb_getowner();
void filedb_setowner();
void filedb_getdesc();
void filedb_setdesc();
int filedb_getgots();
void filedb_setlink();
void filedb_getlink();
void filedb_getfiles();
void filedb_getdirs();
void filedb_change();

/* fileq.c */
int expmem_fileq();
void send_next_file();
void show_queued_files();
void fileq_cancel();
void queue_file();
void tcl_get_queued();

/* files.c */
int too_many_filers();
int at_limit();
int welcome_to_files();
void add_file();
void incr_file_gots();
int is_file();
int files_get();
void files_setpwd();

/* gotdcc.c */
void gotdcc();
void failed_got_dcc();
void cont_got_dcc();
void do_boot();
int detect_dcc_flood();
void wipe_tmp_filename();
void wipe_tmp_file();
int raw_dcc_send();
int do_dcc_send();

/* hash.c */
void gotcmd();
int got_dcc_cmd();
int got_files_cmd();
void dcc_bot();
void init_builtins();

/* main.c */
void fatal();
void fixcolon();
void parsemsg();
int detect_flood();
void strip_telnet();
void swallow_telnet_codes();
int expected_memory();
void change_telnet_port();

/* match.c */
int wild_match();
int wild_match_per();
int wild_match_file();

/* mem.c */
void init_mem();
void *n_malloc();
void *n_realloc();
void n_free();
void tell_mem_status();
void tell_mem_status_dcc();
void debug_mem_to_dcc();

/* misc.c */
void init_misc();
int expmem_misc();
void putlog();
void fixfrom();
void maskhost();
char *stristr();
void rmspace();
void split();
void splitc();
void nsplit();
void splitnick();
void dumplots();
void daysago();
void days();
void daysdur();
void mprintf();
void hprintf();
void deq_msg();
void empty_msgq();
int can_resync();
void q_tbuf();
void q_resync();
void dump_resync();
int flush_tbuf();
void new_tbuf();
void check_expired_tbufs();
void status_tbufs();
void help_subst();
void show_motd();
void tellhelp();
void showhelp();
void telltext();
void showtext();
int copyfile();
int movefile();
void helpbot_activity();

/* mode.c */
void add_mode();
void flush_mode();
void flush_modes();
void recheck_chanmode();
void get_mode_protect();
void set_mode_protect();
void gotmode();
void got_op();

/* msgnotice.c */
void gotmsg();
void gotnotice();
void goterror();

/* net.c */
void init_net();
int expmem_net();
IP my_atoul();
IP getmyip();
void getmyhostname();
void neterror();
void setsock();
int getsock();
void killsock();
int answer();
int open_listen();
int open_telnet();
int open_telnet_dcc();
int open_telnet_raw();
void my_memcpy();
void tputs();
void dequeue_sockets();
void tprintf();
int sockgets();
void tell_netdebug();

/* notes.c */
int num_notes();
void notes_change();
void expire_notes();
int add_note();
void notes_read();
void notes_del();

/* botcmd.c */

/* botnet.c */
void init_bots();
int expmem_botnet();
char *lastbot();
int nextbot();
int in_chain();
void got_tand_next();
int get_tands();
char *get_tandbot();
char *get_assoc_name();
int get_assoc();
void dump_assoc();
void kill_assoc();
void add_assoc();
void ask_tandem_for_ops();
void reject_bot();
void tell_bots();
void tell_bottree();
int botlink();
int botunlink();
void pre_relay();
void failed_pre_relay();
void tandem_relay();
void failed_link();
void cont_link();
void failed_tandem_relay();
void cont_tandem_relay();
void dump_links();
void addbot();
void rembot();
void unvia();
void cancel_user_xfer();
void check_botnet_pings();
void drop_alt_bots();
void addparty();
void remparty();
void partystat();
void partyidle();
void partysetidle();
void partyaway();
void answer_local_whoz();
char geticon();
void zapfbot();

/* tcl.c */
void init_tcl();
void protect_tcl();
void unprotect_tcl();
int expmem_tcl();
void check_timers();
void do_tcl();
void set_tcl_vars();
void get_tcl_vars();
int readtclprog();
int findidx();
void warn_obsolete();

/* tclhash.c */
void init_hash();
int expmem_tclhash();
void *tclcmd_alloc();
int get_bind_type();
int cmd_bind();
int cmd_unbind();
int check_tcl_msg();
int check_tcl_dcc();
int check_tcl_fil();
int check_tcl_pub();
void check_tcl_msgm();
void check_tcl_pubm();
void check_tcl_join();
void check_tcl_part();
void check_tcl_sign();
void check_tcl_kick();
void check_tcl_topc();
void check_tcl_mode();
void check_tcl_nick();
int check_tcl_ctcp();
int check_tcl_ctcr();
#ifdef USE_CONSOLE_R
void check_tcl_raw();
#endif
void check_tcl_tand();
void check_tcl_chon();
void check_tcl_chof();
void check_tcl_sent();
void check_tcl_rcvd();
void check_tcl_chat();
void check_tcl_link();
void check_tcl_disc();
void check_tcl_rejn();
void check_tcl_splt();
int check_tcl_filt();
int check_tcl_flud();
int check_tcl_note();
void check_tcl_act();
int check_tcl_wall();
void tell_binds();
int call_tcl_func();

/* userrec.c */
struct eggqueue *del_q();
struct eggqueue *add_q();
void chg_q();
void flags2str();
unsigned int str2flags();
void get_handle_by_host();
struct userrec *adduser();
void addhost_by_handle();
void addhost_by_handle2();
int delhost_by_handle();
int ishost_for_handle();
int is_user();
int is_user2();
int count_users();
int deluser();
void freeuser();
int change_handle();
void correct_handle();
void clear_userlist();
void get_pass_by_handle();
void change_pass_by_handle();
int pass_match_by_handle();
int pass_match_by_host();
int get_attr_host();
int get_attr_handle();
void set_attr_handle();
int change_attr();
void get_handle_email();
void set_handle_email();
void get_handle_info();
void set_handle_info();
void get_handle_comment();
void set_handle_comment();
void get_handle_dccdir();
void set_handle_dccdir();
char *get_handle_xtra();
void set_handle_xtra();
void add_handle_xtra();
void get_handle_laston();
void set_handle_laston();
void set_handle_laston2();
void update_laston();
void write_userfile();
int write_tmp_userfile();
int flags_ok();
int flags_eq();

/* users.c */
int expmem_users();
char *cursend();
void addban();
void u_addban();
int delban();
int u_delban();
void tell_bans();
void addignore();
int delignore();
void tell_ignores();
int equals_ban();
int u_equals_ban();
int match_ban();
int u_match_ban();
int match_ignore();
void check_expired_bans();
void check_expired_ignores();
void recheck_bans();
void refresh_ban_kick();
void autolink_cycle();
void start_sending_users();
void finish_share();
void showinfo();
void tell_user_ident();
void tell_users_match();
int readuserfile();
