File src/dinoex_misc.c

* by Dirk Meyer (dinoex) * Copyright (C) 2004-2011 Dirk Meyer * * By using this file, you agree to the terms and conditions set * forth in the GNU General Public License. More information is * available in the LICENSE file. * * If you received this file without documentation, it can be * downloaded from http://iroffer.dinoex.net/ * * $Id: dinoex_misc.c,v 1.342 2012/01/13 17:18:22 cvs Exp $ *


Included Files

include the headers


Preprocessor definitions

#define _LONGLONG 1

Typedef remaining_transfer_time

typedef struct {...} remaining_transfer_time
struct  
   {  
      transfer* tr;  
      int left;  
      int dummy;  
   }  

Global Variable xdcc_statefile

xdcc xdcc_statefile
Visible in:   src/dinoex_admin.c
    src/dinoex_chat.c
    src/dinoex_config.c
    src/dinoex_http.c
    src/dinoex_irc.c
    src/dinoex_jobs.c
    src/dinoex_main.c
    src/dinoex_misc.c
    src/dinoex_queue.c
    src/dinoex_ruby.c
    src/dinoex_telnet.c
    src/dinoex_transfer.c
    src/dinoex_upload.c
    src/dinoex_user.c
    src/iroffer_admin.c
    src/iroffer_dccchat.c
    src/iroffer_main.c
    src/iroffer_misc.c
    src/iroffer_statefile.c
    src/iroffer_transfer.c
    src/iroffer_utilities.c
Used in: free_state() src/dinoex_main.c
  startup_dinoex() src/dinoex_misc.c
  update_hour_dinoex() src/dinoex_misc.c

Global Variable xdcc_listfile

xdcc xdcc_listfile
Visible in:   src/dinoex_admin.c
    src/dinoex_chat.c
    src/dinoex_config.c
    src/dinoex_http.c
    src/dinoex_irc.c
    src/dinoex_jobs.c
    src/dinoex_main.c
    src/dinoex_misc.c
    src/dinoex_queue.c
    src/dinoex_ruby.c
    src/dinoex_telnet.c
    src/dinoex_transfer.c
    src/dinoex_upload.c
    src/dinoex_user.c
    src/iroffer_admin.c
    src/iroffer_dccchat.c
    src/iroffer_main.c
    src/iroffer_misc.c
    src/iroffer_statefile.c
    src/iroffer_transfer.c
    src/iroffer_utilities.c
Used in: free_state() src/dinoex_main.c
  get_download_pack() src/dinoex_user.c
  get_pack_nr() src/dinoex_admin.c
  get_xdcc_pack() src/dinoex_misc.c
  number_of_pack() src/dinoex_misc.c
  startup_dinoex() src/dinoex_misc.c

Global Variable end_remain

remaining_transfer_time* end_remain
Visible in:   src/dinoex_misc.c
Used in: get_next_transfer_time() src/dinoex_misc.c
  guess_end_transfers() src/dinoex_misc.c

Global Variable end_lastrtime

unsigned long end_lastrtime
Visible in:   src/dinoex_misc.c
Used in: add_new_transfer_time() src/dinoex_misc.c
  get_next_transfer_time() src/dinoex_misc.c
  guess_end_transfers() src/dinoex_misc.c

Local Variables

end_trans
static irlist_t end_trans
Used in: guess_end_cleanup()  
  guess_end_transfers()  

dinoex_nexthour
static long dinoex_nexthour

Used in: startup_dinoex()  
  update_hour_dinoex()  

style_on
15

static const char* style_on[16]

Used in: color_text()  

Global Function access_need_level()

check level and inform the user which level he needs

unsigned int access_need_level ( const char* nick, const char* text )

Prototyped in: src/dinoex_misc.h
Calls: access_need_text() src/dinoex_misc.c
  isinmemberlist() src/iroffer_utilities.c
  notice() src/iroffer_utilities.c
Called by: get_download_pack() src/dinoex_user.c
  parse_xdcc_list() src/dinoex_user.c

Global Function add_new_transfer_time()

add up the time for a queued pack

void add_new_transfer_time ( xdcc* xd )

Prototyped in: src/dinoex_misc.h
Called by: a_qul2() src/dinoex_admin.c
  notifyqueued_queue() src/dinoex_misc.c
References Variables: end_lastrtime src/dinoex_misc.c
  gdata src/dinoex_main.c

Global Function add_newest_xdcc()

chek if socket if it matches a list of networks

void add_newest_xdcc ( irlist_t* list, const char* grouplist )

Prototyped in: src/dinoex_misc.h
Calls: hide_pack() src/dinoex_misc.c
  irlist_add2() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  verify_group_in_grouplist() src/dinoex_utilities.c
Called by: a_new_announce() src/dinoex_admin.c
  run_new_trigger() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function auto_rehash()

check if config files have changed and start a rehash

void auto_rehash ( void )

Prototyped in: src/dinoex_misc.h
Calls: outerror() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  __error(), close(), fstat(), open(), strerror()
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function check_level()

returns true if prefix of user matches need_level

unsigned int check_level ( int prefix )

Prototyped in: src/dinoex_misc.h
Calls: get_level() src/dinoex_misc.c
  get_voice() src/dinoex_misc.c
Called by: get_grouplist_access() src/dinoex_misc.c
  isinmemberlist() src/iroffer_utilities.c
References Variables: gnetwork src/dinoex_main.c

Global Function color_text()

colored text

char* color_text ( char* desc, unsigned int color )

Prototyped in: src/dinoex_misc.h
Calls: mymalloc2() src/iroffer_utilities.c
  snprintf()
Called by: a_announce_msg() src/dinoex_admin.c
  xd_color_description() src/dinoex_misc.c
References Variables: gnetwork src/dinoex_main.c
  style_on src/dinoex_misc.c

Global Function config_dinoex()

initializes sub systems after config

void config_dinoex ( void )

Prototyped in: src/dinoex_misc.h
Calls: global_defaults() src/dinoex_misc.c
  h_setup_listen() src/dinoex_http.c
  init_upnp() src/upnp.c
  startup_myruby() src/dinoex_ruby.c
  telnet_setup_listen() src/dinoex_telnet.c
Called by: startupiroffer() src/iroffer_misc.c
References Variables: gdata src/dinoex_main.c

Global Function disk_full()

check for disk full on uploads

unsigned int disk_full ( const char* path )

Prototyped in: src/dinoex_misc.h
Calls: ioutput() src/iroffer_utilities.c
  __error(), statvfs(), strerror()
Called by: a_fetch() src/dinoex_admin.c
  upload_start() src/dinoex_upload.c
References Variables: gdata src/dinoex_main.c

Global Function dump_slow_context()

dump slow functions

void dump_slow_context ( void )

Prototyped in: src/dinoex_misc.h
Calls: ioutput() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  snprintf()
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c

Global Function fnmatch_xdcc()

check if a pack matches a fnmatch search

unsigned int fnmatch_xdcc ( const char* match, xdcc* xd )

Prototyped in: src/dinoex_misc.h
Calls: getfilename() src/dinoex_utilities.c
  user_getdatestr() src/dinoex_utilities.c
  fnmatch()
Called by: a_find() src/dinoex_admin.c
  command_xdcc() src/dinoex_user.c
  noticeresults() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function free_channel_data()

drop all strings from a channel

void free_channel_data ( channel_t* ch )

Prototyped in: src/dinoex_misc.h
Calls: mydelete2() src/iroffer_utilities.c
Called by: a_part() src/dinoex_admin.c
  a_quit_network() src/dinoex_jobs.c
  a_rehash_channels() src/dinoex_jobs.c
  free_state() src/dinoex_main.c

Global Function free_delayed()

drop all delayed actions

void free_delayed ( void )

Prototyped in: src/dinoex_misc.h
Calls: free_userinput() src/dinoex_misc.c
  irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
Called by: a_autocancel() src/dinoex_admin.c
  free_state() src/dinoex_main.c
References Variables: gdata src/dinoex_main.c

Global Function free_userinput()

free all strings from userinput

void free_userinput ( userinput* const u )

Prototyped in: src/dinoex_misc.h
Calls: mydelete2() src/iroffer_utilities.c
Called by: free_delayed() src/dinoex_misc.c
  run_delayed_jobs() src/dinoex_jobs.c
  u_fillwith_clean() src/iroffer_admin.c

Global Function get_current_bandwidth()

clculate current bandwidth as text

char* get_current_bandwidth ( void )

Prototyped in: src/dinoex_misc.h
Calls: mymalloc2() src/iroffer_utilities.c
  snprintf()
Called by: h_html_index() src/dinoex_http.c
  p_banduse() src/dinoex_config.c
  xdcc_save_xml() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function get_grouplist_access()

returns list of allowed groups for nick on current network, or NULL for unrestricted access. calling function must take care of freeing result

char* get_grouplist_access ( const char* nick )

Prototyped in: src/dinoex_misc.h
Calls: check_level() src/dinoex_misc.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  snprintf(), strcasecmp()
Called by: command_xdcc() src/dinoex_user.c
  get_download_pack() src/dinoex_user.c
References Variables: gnetwork src/dinoex_main.c

Global Function get_grouplist_channel()

apply per-channel visibility rules

const char* get_grouplist_channel ( const char* dest )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  strcasecmp()
Called by: a_new_announce() src/dinoex_admin.c
  noticeresults() src/dinoex_user.c
  privmsgparse2() src/dinoex_user.c
References Variables: gnetwork src/dinoex_main.c

Global Function get_next_transfer_time()

calculate next transfer time

unsigned long get_next_transfer_time ( void )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_next() src/iroffer_utilities.c
Called by: a_qul2() src/dinoex_admin.c
  guess_end_transfers() src/dinoex_misc.c
  notifyqueued_queue() src/dinoex_misc.c
References Variables: end_lastrtime src/dinoex_misc.c
  end_remain src/dinoex_misc.c

Global Function get_nickserv_pass()

get get_nickserv_pass for current network

char* get_nickserv_pass ( void )

Prototyped in: src/dinoex_misc.h
Called by: a_identify() src/dinoex_admin.c
  identify_check() src/dinoex_irc.c
  identify_needed() src/dinoex_irc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function get_restrictsend()

get restrictsend for current network

unsigned int get_restrictsend ( void )

Prototyped in: src/dinoex_misc.h
Called by: queue_reverify_restrictsend() src/dinoex_queue.c
  reverify_restrictsend() src/iroffer_misc.c
  send_xdcc_file2() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function get_user_modes()

get user_modes for current network

char* get_user_modes ( void )

Prototyped in: src/dinoex_misc.h
Called by: irc_001() src/dinoex_irc.c
  u_botinfo() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function get_xdcc_pack()

get pack by number, pack -1 is the xdcc_listfile

xdcc* get_xdcc_pack ( unsigned int pack )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_nth() src/iroffer_utilities.c
Called by: a_iqueue_sub() src/dinoex_admin.c
  a_queue() src/dinoex_admin.c
  a_send() src/dinoex_admin.c
  addtomainqueue() src/dinoex_queue.c
  cie_info_pack() src/dinoex_ruby.c
  get_download_pack() src/dinoex_user.c
  h_admin() src/dinoex_http.c
  read_statefile_queue() src/iroffer_statefile.c
  u_info() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c
  xdcc_listfile src/dinoex_misc.c

Global Function guess_end_cleanup()

reset calculated times

void guess_end_cleanup ( void )

Prototyped in: src/dinoex_misc.h
Calls: irlist_delete_all() src/iroffer_utilities.c
Called by: a_qul() src/dinoex_admin.c
  notifyqueued_nick() src/dinoex_misc.c
References Variables: end_trans src/dinoex_misc.c

Global Function guess_end_transfers()

calculate the time for the current running traansfers to end

void guess_end_transfers ( void )

Prototyped in: src/dinoex_misc.h
Calls: get_next_transfer_time() src/dinoex_misc.c
  irlist_add2() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  irlist_insert_after() src/iroffer_utilities.c
  irlist_insert_head() src/iroffer_utilities.c
  irlist_remove() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  memset()
Called by: a_qul() src/dinoex_admin.c
  notifyqueued_nick() src/dinoex_misc.c
References Variables: end_lastrtime src/dinoex_misc.c
  end_remain src/dinoex_misc.c
  end_trans src/dinoex_misc.c
  gdata src/dinoex_main.c

Global Function hexdump()

generate an hexdump from a buffer with given length

void hexdump ( int dest, unsigned int color_flags, const char* prefix, void* t, size_t max )

Prototyped in: src/dinoex_misc.h
Calls: ioutput() src/iroffer_utilities.c
  onlyprintable() src/dinoex_misc.c
  snprintf()
Called by: debug_memory() src/dinoex_main.c
  mydelete2() src/iroffer_utilities.c
  t_readjunk() src/iroffer_transfer.c

Global Function hide_pack()

returns true if pack should not be listed

unsigned int hide_pack ( const xdcc* xd )

Prototyped in: src/dinoex_misc.h
Called by: add_newest_xdcc() src/dinoex_misc.c
  command_xdcc() src/dinoex_user.c
  get_toffered() src/dinoex_config.c
  h_html_file() src/dinoex_http.c
  h_html_main() src/dinoex_http.c
  noticeresults() src/dinoex_user.c
  send_xdcc_info() src/dinoex_user.c
  xdcc_save_xml() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function init_xdcc_file()

init a pack with the information from disk

unsigned int init_xdcc_file ( xdcc* xd, char* file )

Prototyped in: src/dinoex_misc.h
Calls: getfilename() src/dinoex_utilities.c
  mydelete2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  close(), fstat(), open()
Called by: get_download_pack() src/dinoex_user.c
  get_pack_nr() src/dinoex_admin.c
  send_from_queue() src/dinoex_queue.c
  send_xdcc_file() src/dinoex_misc.c
  send_xdcc_file2() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function logfile_add()

write a line with timestamp to a logfile

void logfile_add ( const char* logfile, const char* line )

Prototyped in: src/dinoex_misc.h
Calls: getdatestr() src/iroffer_utilities.c
  mylog_close() src/dinoex_utilities.c
  mylog_write() src/dinoex_utilities.c
  open_append() src/dinoex_utilities.c
  snprintf()
Called by: mylog() src/iroffer_utilities.c
  privmsgparse2() src/dinoex_user.c
  vioutput() src/iroffer_utilities.c

Global Function notifyqueued()

notify all queued users

void notifyqueued ( void )

Prototyped in: src/dinoex_misc.h
Calls: ioutput() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
  notifyqueued_nick() src/dinoex_misc.c
  updatecontext_f() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Global Function notifyqueued_nick()

infom the user of each pack in main queue and the first pack in idle queue

unsigned int notifyqueued_nick ( const char* nick )

Prototyped in: src/dinoex_misc.h
Calls: guess_end_cleanup() src/dinoex_misc.c
  guess_end_transfers() src/dinoex_misc.c
  notifyqueued_queue() src/dinoex_misc.c
  updatecontext_f() src/iroffer_utilities.c
  localtime(), strftime()
Called by: command_xdcc() src/dinoex_user.c
  notifyqueued() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c

Global Function number_of_pack()

returns the current number of the pack

unsigned int number_of_pack ( xdcc* pack )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: a_add2() src/dinoex_admin.c
  a_addann() src/dinoex_admin.c
  a_md5() src/dinoex_admin.c
  a_new_announce() src/dinoex_admin.c
  a_newdir_check() src/dinoex_admin.c
  a_qul2() src/dinoex_admin.c
  a_set_group() src/dinoex_admin.c
  cancel_md5_hash() src/dinoex_jobs.c
  check_for_renamed_file() src/dinoex_admin.c
  check_trigger() src/dinoex_user.c
  complete_md5_hash() src/dinoex_jobs.c
  dumpgdata() src/iroffer_utilities.c
  h_html_file() src/dinoex_http.c
  look_for_file_changes() src/iroffer_misc.c
  mainloop() src/iroffer_main.c
  packnumtonum() src/dinoex_misc.c
  queue_xdcc_remove() src/dinoex_queue.c
  read_statefile() src/iroffer_statefile.c
  run_new_trigger() src/dinoex_user.c
  send_from_queue() src/dinoex_queue.c
  t_flushed() src/iroffer_transfer.c
  u_botinfo() src/iroffer_admin.c
  u_dcl() src/iroffer_admin.c
  u_dcld() src/iroffer_admin.c
  validate_crc32() src/dinoex_jobs.c
  write_statefile_queue() src/iroffer_statefile.c
References Variables: gdata src/dinoex_main.c
  xdcc_listfile src/dinoex_misc.c

Global Function packnumtonum()

find a pack by a number, #number or trigger

int packnumtonum ( const char* a )

Prototyped in: src/dinoex_misc.h
Calls: find_pack_crc() src/dinoex_misc.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  number_of_pack() src/dinoex_misc.c
  atoi(), strcasecmp()
Called by: get_pack_nr() src/dinoex_admin.c
  get_pack_nr1() src/dinoex_admin.c
  send_batch_search() src/dinoex_user.c
  send_xdcc_file() src/dinoex_user.c
  send_xdcc_info() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function rehash_dinoex()

do a reahsh for all sub systems

void rehash_dinoex ( void )

Prototyped in: src/dinoex_misc.h
Calls: geoip_shutdown() src/dinoex_geoip.c
  global_defaults() src/dinoex_misc.c
  h_reash_listen() src/dinoex_http.c
  rehash_myruby() src/dinoex_ruby.c
  telnet_reash_listen() src/dinoex_telnet.c
  __res_init()
Called by: u_rehash() src/iroffer_admin.c

Global Function set_support_groups()

ckeck if we have any pack with a group

void set_support_groups ( void )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: a_add2() src/dinoex_admin.c
  a_remove_pack_final() src/dinoex_admin.c
  a_set_group() src/dinoex_admin.c
  import_pack() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function shutdown_dinoex()

shutdown sub systems

void shutdown_dinoex ( void )

Prototyped in: src/dinoex_misc.h
Calls: curl_shutdown() src/dinoex_curl.c
  geoip_shutdown() src/dinoex_geoip.c
  h_close_listen() src/dinoex_http.c
  shutdown_myruby() src/dinoex_ruby.c
  telnet_close_listen() src/dinoex_telnet.c
Called by: exit_iroffer() src/dinoex_main.c

Global Function slotsfree()

get coorent free slots

unsigned int slotsfree ( void )

Prototyped in: src/dinoex_misc.h
Calls: irlist_size() src/iroffer_utilities.c
Called by: h_html_index() src/dinoex_http.c
  p_slotsfree() src/dinoex_config.c
  xdcc_save_xml() src/dinoex_jobs.c
References Variables: gdata src/dinoex_main.c

Global Function startup_dinoex()

initializes sub systems prior config

void startup_dinoex ( void )

Prototyped in: src/dinoex_misc.h
Calls: config_startup() src/dinoex_config.c
  curl_startup() src/dinoex_curl.c
  init_base64decode() src/dinoex_http.c
  init_fish64decode() src/dinoex_jobs.c
  init_xdcc() src/dinoex_misc.c
  ssl_startup() src/dinoex_ssl.c
  __res_init()
Called by: startupiroffer() src/iroffer_misc.c
References Variables: dinoex_nexthour src/dinoex_misc.c
  gdata src/dinoex_main.c
  xdcc_listfile src/dinoex_misc.c
  xdcc_statefile src/dinoex_misc.c

Global Function text_connectionmethod()

show connectionmethod in text

const char* text_connectionmethod ( how_e how )

Prototyped in: src/dinoex_misc.h
Called by: dump_config_fdump() src/dinoex_config.c
  u_botinfo() src/iroffer_admin.c

Global Function text_pformat()

show style of plist in text

const char* text_pformat ( unsigned int val )

Prototyped in: src/dinoex_misc.h
Called by: dump_config_fdump() src/dinoex_config.c
  u_botinfo() src/iroffer_admin.c

Global Function transfer_limit_exceeded_msg()

inform the user a trasferlimit has reahed

char* transfer_limit_exceeded_msg ( unsigned int ii )

Prototyped in: src/dinoex_misc.h
Calls: getdatestr() src/iroffer_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  transferlimit_type_to_string() src/iroffer_utilities.c
  snprintf()
Called by: mainloop() src/iroffer_main.c
  send_xdcc_file2() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function update_hour_dinoex()

send statefile once a hour

void update_hour_dinoex ( unsigned int minute )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  send_xdcc_file() src/dinoex_misc.c
  updatecontext_f() src/iroffer_utilities.c
Called by: mainloop() src/iroffer_main.c
References Variables: dinoex_nexthour src/dinoex_misc.c
  gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c
  xdcc_statefile src/dinoex_misc.c

Global Function verify_cidr()

chek if socket if it matches a list of networks

unsigned int verify_cidr ( irlist_t* list, const ir_sockaddr_union_t* remote )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  verify_bits() src/dinoex_misc.c
Called by: h_accept() src/dinoex_http.c
  t_check_ip_access() src/dinoex_transfer.c
  telnet_accept() src/dinoex_telnet.c

Global Function verifypass_group()

verify password for group admins

group_admin_t* verifypass_group ( const char* hostmask, const char* passwd )

Prototyped in: src/dinoex_misc.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  verifypass2() src/dinoex_utilities.c
  fnmatch()
Called by: dcc_host_password() src/dinoex_chat.c
  msg_host_password() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function xd_color_description()

colored description of a pack

char* xd_color_description ( const xdcc* xd )

Prototyped in: src/dinoex_misc.h
Calls: color_text() src/dinoex_misc.c
Called by: a_announce_msg() src/dinoex_admin.c
  a_new_announce() src/dinoex_admin.c
  a_sannounce() src/dinoex_admin.c
  a_xdl_pack() src/dinoex_admin.c
  command_xdcc() src/dinoex_user.c
  noticeresults() src/dinoex_user.c
  run_new_trigger() src/dinoex_user.c

Local Function access_need_text()

static const char* access_need_text ( void )
Calls: get_level() src/dinoex_misc.c
  get_voice() src/dinoex_misc.c
Called by: access_need_level() src/dinoex_misc.c

Local Function find_pack_crc()

find a pack by its CRC32

static int find_pack_crc ( const char* crc )

Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  snprintf(), strlen(), strncmp()
Called by: packnumtonum() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c

Local Function get_level()

static unsigned int get_level ( void )
Called by: access_need_text() src/dinoex_misc.c
  check_level() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function get_voice()

static unsigned int get_voice ( void )
Called by: access_need_text() src/dinoex_misc.c
  check_level() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function global_defaults()

copy global settings into each network

static void global_defaults ( void )

Calls: mystrdup2() src/dinoex_utilities.c
  update_natip() src/dinoex_irc.c
Called by: config_dinoex() src/dinoex_misc.c
  rehash_dinoex() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function init_xdcc()

clear all data of a pack

static void init_xdcc ( xdcc* xd )

Calls: bzero()
Called by: startup_dinoex() src/dinoex_misc.c

Local Function notifyqueued_queue()

static unsigned int notifyqueued_queue ( irlist_t* list, const char* nick, const char* ntime, unsigned int idle )
Calls: add_new_transfer_time() src/dinoex_misc.c
  get_next_transfer_time() src/dinoex_misc.c
  ioutput() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  irlist_size() src/iroffer_utilities.c
  notice_slow() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  strcasecmp()
Called by: notifyqueued_nick() src/dinoex_misc.c
References Variables: gdata src/dinoex_main.c
  gnetwork src/dinoex_main.c

Local Function onlyprintable()

convert to ASCII char

static unsigned int onlyprintable ( unsigned int a )

Called by: hexdump() src/dinoex_misc.c

Local Function send_xdcc_file()

static int send_xdcc_file ( xdcc* xd, char* file, const char* nick, const char* hostname )
Calls: create_transfer() src/dinoex_transfer.c
  init_xdcc_file() src/dinoex_misc.c
  ioutput() src/iroffer_utilities.c
  t_setup_dcc() src/dinoex_transfer.c
  updatecontext_f() src/iroffer_utilities.c
Called by: update_hour_dinoex() src/dinoex_misc.c

Local Function verify_bits()

static unsigned int verify_bits ( unsigned int bits, const unsigned char* data1, const unsigned char* data2 )
Called by: verify_cidr() src/dinoex_misc.c