File src/dinoex_utilities.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_utilities.c,v 1.112 2011/12/09 12:36:32 cvs Exp $ *


Included Files

include the headers


Preprocessor definitions

#define _LONGLONG 1

#define SIZESTR_SIZE 5L


Local Variables

size_units
static const const char const size_units[]
Used in: sizestr()  

Global Function caps()

convert a string to uppercase

char* caps ( char* str )

Prototyped in: src/dinoex_utilities.h
Calls: __sbistype(), __sbtoupper()
Called by: a_addgroup() src/dinoex_admin.c
  a_autogroup() src/dinoex_admin.c
  a_group() src/dinoex_admin.c
  a_join() src/dinoex_admin.c
  a_movegroup() src/dinoex_admin.c
  a_movegroupdir() src/dinoex_admin.c
  a_newgroup() src/dinoex_admin.c
  a_parse_inputline() src/dinoex_admin.c
  a_regroup() src/dinoex_admin.c
  botonly_parse() src/dinoex_user.c
  c_channel() src/dinoex_config.c
  command_xdcc() src/dinoex_user.c
  create_transfer() src/dinoex_transfer.c
  ir_parseline2() src/dinoex_irc.c
  irc_001() src/dinoex_irc.c
  isinmemberlist() src/iroffer_utilities.c
  parse_xdcc_list() src/dinoex_user.c
  parsedccchat() src/iroffer_dccchat.c
  privmsgparse() src/dinoex_user.c
  privmsgparse2() src/dinoex_user.c
  send_clientinfo() src/dinoex_user.c
  u_expand_command2() src/iroffer_admin.c
  u_shutdown() src/iroffer_admin.c
  validate_crc32() src/dinoex_jobs.c

Global Function clean_quotes()

strip quotes from a string

char* clean_quotes ( char* str )

Prototyped in: src/dinoex_utilities.h
Calls: strlen()
Called by: a_amsg() src/dinoex_admin.c
  a_announce_sub() src/dinoex_admin.c
  a_chdesc() src/dinoex_admin.c
  a_chlimitinfo() src/dinoex_admin.c
  a_chnote() src/dinoex_admin.c
  a_chtime() src/dinoex_admin.c
  a_chtrigger() src/dinoex_admin.c
  a_fetch() src/dinoex_admin.c
  a_find() src/dinoex_admin.c
  a_groupdesc() src/dinoex_admin.c
  a_listul() src/dinoex_admin.c
  a_nosend() src/dinoex_admin.c
  a_rmul() src/dinoex_admin.c
  get_argv2() src/dinoex_utilities.c
  getpart_eol() src/dinoex_utilities.c
  h_html_index() src/dinoex_http.c
  invalid_command() src/dinoex_admin.c

Global Function convert_spaces_to_match()

count length of pattern without wildcards

unsigned int convert_spaces_to_match ( char* str )

Prototyped in: src/dinoex_utilities.h
Called by: command_xdcc() src/dinoex_user.c
  do_atfind() src/dinoex_user.c

Global Function get_argv2()

split a line in a number of arguments, recording orign

unsigned int get_argv2 ( char** result, const char* line, unsigned int howmany, const char* src_function, const char* src_file, unsigned int src_line )

Prototyped in: src/dinoex_utilities.h
Calls: clean_missing_parts() src/dinoex_utilities.c
  clean_quotes() src/dinoex_utilities.c
  mymalloc2() src/iroffer_utilities.c
  memcpy()
Called by: a_parse_inputline() src/dinoex_admin.c
  admin_msg_line() src/dinoex_user.c
  c_autosendpack() src/dinoex_config.c
  c_channel() src/dinoex_config.c
  c_connectionmethod() src/dinoex_config.c
  c_overallmaxspeeddaytime() src/dinoex_config.c
  c_periodicmsg() src/dinoex_config.c
  c_server() src/dinoex_config.c
  c_transferlimits() src/dinoex_config.c
  do_myruby_ruby() src/dinoex_ruby.c
  getconfig_set() src/dinoex_config.c
  ir_parseline() src/dinoex_irc.c
  parse_channel_options() src/dinoex_config.c
  privmsgparse() src/dinoex_user.c

Global Function get_port()

get the port number from a socket

ir_uint16 get_port ( ir_sockaddr_union_t* listenaddr )

Prototyped in: src/dinoex_utilities.h
Calls: __bswap16()
Called by: h_accept() src/dinoex_http.c
  ir_bind_listen_socket() src/iroffer_utilities.c
  irc_open_listen() src/dinoex_irc.c
  l_setup_accept() src/dinoex_upload.c

Global Function get_time_in_ms()

get current time in ms

ir_uint64 get_time_in_ms ( void )

Prototyped in: src/dinoex_utilities.h
Calls: timeval_to_ms() src/dinoex_utilities.c
  gettimeofday()
Called by: u_runcmd() src/iroffer_admin.c
  write_statefile() src/iroffer_statefile.c

Global Function getfilename()

returns the filename part of a full pathname

const char* getfilename ( const char* pathname )

Prototyped in: src/dinoex_utilities.h
Calls: strrchr()
Called by: a_add2() src/dinoex_admin.c
  a_autoaddann() src/dinoex_admin.c
  a_chdesc() src/dinoex_admin.c
  a_chfile_sub() src/dinoex_admin.c
  a_movegroupdir() src/dinoex_admin.c
  a_qul2() src/dinoex_admin.c
  a_sort_cmp() src/dinoex_admin.c
  check_for_renamed_file() src/dinoex_admin.c
  cie_info_pack() src/dinoex_ruby.c
  command_options() src/dinoex_main.c
  fnmatch_xdcc() src/dinoex_misc.c
  h_admin() src/dinoex_http.c
  import_pack() src/dinoex_jobs.c
  init_xdcc_file() src/dinoex_misc.c
  read_statefile() src/iroffer_statefile.c
  save_unlink() src/dinoex_jobs.c
  u_dcl() src/iroffer_admin.c
  u_dcld() src/iroffer_admin.c
  u_trinfo() src/iroffer_admin.c
  upload_start() src/dinoex_upload.c
  validate_crc32() src/dinoex_jobs.c
  write_statefile_xdccs() src/iroffer_statefile.c

Global Function getpart2()

extract one argument from a line, recording orign

char* getpart2 ( const char* line, unsigned int howmany, const char* src_function, const char* src_file, unsigned int src_line )

Prototyped in: src/dinoex_utilities.h
Calls: mymalloc2() src/iroffer_utilities.c
  memcpy()
Called by: cie_channel() src/dinoex_ruby.c
  cie_hostmask() src/dinoex_ruby.c
  cie_nick() src/dinoex_ruby.c
  ir_parseline2() src/dinoex_irc.c
  irc_001() src/dinoex_irc.c
  irc_005() src/dinoex_irc.c
  setupdccchat() src/iroffer_dccchat.c

Global Function getpart_eol()

extract everything starting with the given argument

char* getpart_eol ( const char* line, unsigned int howmany )

Prototyped in: src/dinoex_utilities.h
Calls: clean_quotes() src/dinoex_utilities.c
  mystrdup2() src/dinoex_utilities.c
Called by: a_parse_inputline() src/dinoex_admin.c
  cie_message() src/dinoex_ruby.c
  command_xdcc() src/dinoex_user.c
  do_atfind() src/dinoex_user.c

Global Function grep_to_fnmatch()

convert a search string into fnmatch

char* grep_to_fnmatch ( const char* grep )

Prototyped in: src/dinoex_utilities.h
Calls: hostmask_to_fnmatch() src/dinoex_utilities.c
  mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  snprintf(), strlen()
Called by: a_find() src/dinoex_admin.c
  command_xdcc() src/dinoex_user.c
  noticeresults() src/dinoex_user.c

Global Function hostmask_to_fnmatch()

convert hostmask to fnmatch pattern

char* hostmask_to_fnmatch ( const char* str )

Prototyped in: src/dinoex_utilities.h
Calls: mymalloc2() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
Called by: grep_to_fnmatch() src/dinoex_utilities.c
  set_config_list() src/dinoex_config.c

Global Function irlist_add_string()

add a string to a simple list

void irlist_add_string ( irlist_t* list, const char* str )

Prototyped in: src/dinoex_utilities.h
Calls: irlist_add2() src/iroffer_utilities.c
  strcpy(), strlen()
Called by: a_adddir_sub() src/dinoex_admin.c
  a_xdl() src/dinoex_admin.c
  admin_jobs() src/dinoex_jobs.c
  c_channel_join_raw() src/dinoex_config.c
  c_proxyinfo() src/dinoex_config.c
  c_server_connected_raw() src/dinoex_config.c
  c_server_join_raw() src/dinoex_config.c
  set_config_list() src/dinoex_config.c
  u_listdir() src/iroffer_admin.c
  vwriteserver() src/iroffer_misc.c

Global Function irlist_sort2()

sort a linked list with selection sort

void irlist_sort2 ( irlist_t* list, int (*cmpfunc)(const void* a,const void* b) )

Prototyped in: src/dinoex_utilities.h
Calls: 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
Called by: a_adddir_sub() src/dinoex_admin.c
  a_xdl() src/dinoex_admin.c
  h_html_main() src/dinoex_http.c
  u_listdir() src/iroffer_admin.c
  u_memstat() src/iroffer_admin.c

Global Function is_file_writeable()

check if a file is writeable

unsigned int is_file_writeable ( const char* f )

Prototyped in: src/dinoex_utilities.h
Calls: updatecontext_f() src/iroffer_utilities.c
  close(), open()
Called by: a_rmul() src/dinoex_admin.c

Global Function isprintable()

check for non ASCII chars

unsigned int isprintable ( unsigned int a )

Prototyped in: src/dinoex_utilities.h
Called by: parseconsole() src/iroffer_display.c

Global Function max_minutes_waits()

calculate minutes left for reaching a timestamp

unsigned int max_minutes_waits ( time_t* endtime, unsigned int min )

Prototyped in: src/dinoex_utilities.h
Called by: a_noannounce() src/dinoex_admin.c
  a_noautoadd() src/dinoex_admin.c
  a_nolist() src/dinoex_admin.c
  a_nomd5() src/dinoex_admin.c
  a_nosave() src/dinoex_admin.c
  a_nosend() src/dinoex_admin.c
References Variables: gdata src/dinoex_main.c

Global Function mylog_close()

close logfile and warn if not all bytes has been written

void mylog_close ( int fd, const char* filename )

Prototyped in: src/dinoex_utilities.h
Calls: mylog_write_failed() src/dinoex_utilities.c
  close()
Called by: http_access_log_add() src/dinoex_http.c
  logfile_add() src/dinoex_misc.c

Global Function mylog_write()

write data and warn if not all bytes has been written

void mylog_write ( int fd, const char* filename, const char* msg, size_t len )

Prototyped in: src/dinoex_utilities.h
Calls: mylog_write_failed() src/dinoex_utilities.c
  write()
Called by: http_access_log_add() src/dinoex_http.c
  logfile_add() src/dinoex_misc.c

Global Function mystrdup2()

copy a string

char* mystrdup2 ( const char* str, const char* src_function, const char* src_file, unsigned int src_line )

Prototyped in: src/dinoex_utilities.h
Calls: mymalloc2() src/iroffer_utilities.c
  strcpy(), strlen()
Called by: a_acceptu() src/dinoex_admin.c
  a_add2() src/dinoex_admin.c
  a_adddir() src/dinoex_admin.c
  a_adddir_sub() src/dinoex_admin.c
  a_addgroup() src/dinoex_admin.c
  a_addmatch() src/dinoex_admin.c
  a_addnew() src/dinoex_admin.c
  a_autogroup() src/dinoex_admin.c
  a_chdesc() src/dinoex_admin.c
  a_chfile() src/dinoex_admin.c
  a_chfile_sub() src/dinoex_admin.c
  a_chlimitinfo() src/dinoex_admin.c
  a_chnote() src/dinoex_admin.c
  a_chtrigger() src/dinoex_admin.c
  a_filedel() src/dinoex_admin.c
  a_filemove() src/dinoex_admin.c
  a_fileremove() src/dinoex_admin.c
  a_fillwith_msg2() src/dinoex_jobs.c
  a_get() src/dinoex_admin.c
  a_get_color() src/dinoex_admin.c
  a_iqueue_words() src/dinoex_admin.c
  a_join() src/dinoex_admin.c
  a_lock() src/dinoex_admin.c
  a_lockgroup() src/dinoex_admin.c
  a_movefile_sub() src/dinoex_admin.c
  a_movegroupdir() src/dinoex_admin.c
  a_newgroup() src/dinoex_admin.c
  a_nosend() src/dinoex_admin.c
  a_regroup() src/dinoex_admin.c
  a_rehash_cleanup() src/dinoex_jobs.c
  a_rehash_prepare() src/dinoex_jobs.c
  a_relock() src/dinoex_admin.c
  a_removedir() src/dinoex_admin.c
  a_removematch() src/dinoex_admin.c
  a_respond() src/dinoex_admin.c
  a_set_group() src/dinoex_admin.c
  a_showdir() src/dinoex_admin.c
  add_config_file() src/dinoex_main.c
  add_default_groupdesc() src/dinoex_admin.c
  add_msg_statefile() src/dinoex_user.c
  addtoidlequeue() src/dinoex_queue.c
  addtomainqueue() src/dinoex_queue.c
  addtomemberlist() src/iroffer_utilities.c
  admin_msg_line() src/dinoex_user.c
  admin_run() src/dinoex_jobs.c
  autoqueuef() src/dinoex_user.c
  c_auth_name() src/dinoex_config.c
  c_autoadd_group_match() src/dinoex_config.c
  c_group_admin() src/dinoex_config.c
  c_local_vhost() src/dinoex_config.c
  c_login_name() src/dinoex_config.c
  c_mime_type() src/dinoex_config.c
  c_network() src/dinoex_config.c
  c_nickserv_pass() src/dinoex_config.c
  c_statefile() src/dinoex_config.c
  c_usenatip() src/dinoex_config.c
  c_user_modes() src/dinoex_config.c
  c_user_nick() src/dinoex_config.c
  changeinmemberlist_nick() src/iroffer_utilities.c
  check_for_renamed_file() src/dinoex_admin.c
  connectirc() src/iroffer_misc.c
  create_transfer() src/dinoex_transfer.c
  dcc_host_password() src/dinoex_chat.c
  expire_logfiles() src/dinoex_jobs.c
  file_to_dir() src/dinoex_admin.c
  file_without_numbers() src/dinoex_admin.c
  geoip_new_connection() src/dinoex_geoip.c
  get_ignore() src/dinoex_irc.c
  get_url_param() src/dinoex_http.c
  get_zip_crc32_pack() src/dinoex_jobs.c
  getpart_eol() src/dinoex_utilities.c
  global_defaults() src/dinoex_misc.c
  h_accept() src/dinoex_http.c
  h_admin_auth() src/dinoex_http.c
  h_bad_request() src/dinoex_http.c
  h_get() src/dinoex_http.c
  h_herror_403() src/dinoex_http.c
  h_html_index() src/dinoex_http.c
  h_html_link_order() src/dinoex_http.c
  h_parse() src/dinoex_http.c
  h_readfile() src/dinoex_http.c
  h_runruby() src/dinoex_http.c
  html_str_prefix() src/dinoex_http.c
  import_pack() src/dinoex_jobs.c
  import_xdccfile() src/dinoex_jobs.c
  init_xdcc_file() src/dinoex_misc.c
  ir_parseline2() src/dinoex_irc.c
  irc_001() src/dinoex_irc.c
  irlist_add_delayed() src/dinoex_admin.c
  is_unsave_directory() src/dinoex_admin.c
  l_setup_accept() src/dinoex_upload.c
  p_auth_name() src/dinoex_config.c
  p_local_vhost() src/dinoex_config.c
  p_login_name() src/dinoex_config.c
  p_nickserv_pass() src/dinoex_config.c
  p_overallmaxspeeddaydays() src/dinoex_config.c
  p_statefile() src/dinoex_config.c
  p_usenatip() src/dinoex_config.c
  p_user_modes() src/dinoex_config.c
  p_user_nick() src/dinoex_config.c
  p_version() src/dinoex_config.c
  parse_xdcc_list() src/dinoex_user.c
  parsedccchat() src/iroffer_dccchat.c
  print_config_bool() src/dinoex_config.c
  print_config_string() src/dinoex_config.c
  privmsg_decrypt() src/dinoex_jobs.c
  queue_update_nick() src/dinoex_queue.c
  read_statefile() src/iroffer_statefile.c
  read_statefile_string() src/iroffer_statefile.c
  reorder_new_groupdesc() src/dinoex_admin.c
  requeue() src/dinoex_queue.c
  send_batch() src/dinoex_user.c
  set_config_string() src/dinoex_config.c
  set_default_network_name() src/dinoex_config.c
  set_loginname() src/iroffer_utilities.c
  setupdccchat() src/iroffer_dccchat.c
  setupdccchataccept() src/iroffer_dccchat.c
  setupdccchatout() src/iroffer_dccchat.c
  start_fetch_url() src/dinoex_curl.c
  stoplist_announce() src/dinoex_user.c
  stoplist_queue() src/dinoex_user.c
  t_find_transfer() src/dinoex_transfer.c
  t_setup_send() src/iroffer_transfer.c
  telnet_accept() src/dinoex_telnet.c
  to_hostmask() src/dinoex_utilities.c
  u_expand_command() src/iroffer_admin.c
  u_fillwith_dcc() src/iroffer_admin.c
  u_xdl_head() src/iroffer_admin.c
  update_getip_net() src/dinoex_irc.c
  update_natip() src/dinoex_irc.c
  upload_start() src/dinoex_upload.c
  user_changed_nick() src/iroffer_misc.c
  validate_crc32() src/dinoex_jobs.c
  xdcc_save_xml() src/dinoex_jobs.c

Global Function mystrjoin2()

append a suffix to a string and adding a separation character, recording origin

char* mystrjoin2 ( const char* str1, const char* str2, unsigned int delimiter, const char* src_function, const char* src_file, unsigned int src_line )

Prototyped in: src/dinoex_utilities.h
Calls: mymalloc2() src/iroffer_utilities.c
  snprintf(), strlen()
Called by: a_adddir_sub() src/dinoex_admin.c
  a_listul() src/dinoex_admin.c
  a_makedir() src/dinoex_admin.c
  a_newgroup_sub() src/dinoex_admin.c
  a_open_dir() src/dinoex_admin.c
  a_open_file() src/dinoex_admin.c
  a_removedir_sub() src/dinoex_admin.c
  a_rmul() src/dinoex_admin.c
  backup_statefile() src/dinoex_jobs.c
  expire_logfiles() src/dinoex_jobs.c
  l_setup_file() src/dinoex_upload.c
  start_fetch_url() src/dinoex_curl.c

Global Function mystrsuffix2()

append a suffix to a string, recording origin

char* mystrsuffix2 ( const char* str, const char* suffix, const char* src_function, const char* src_file, unsigned int src_line )

Prototyped in: src/dinoex_utilities.h
Calls: mymalloc2() src/iroffer_utilities.c
  snprintf(), strlen()
Called by: a_newdir_check() src/dinoex_admin.c
  admin_run() src/dinoex_jobs.c
  h_runruby() src/dinoex_http.c
  keyfile_present() src/dinoex_ssl.c
  write_statefile() src/iroffer_statefile.c
  xdcc_save_xml() src/dinoex_jobs.c
  xdccsavetext() src/iroffer_misc.c

Global Function no_verifyshell()

match a given file against a list of required patterns

unsigned int no_verifyshell ( irlist_t* list, const char* file )

Prototyped in: src/dinoex_utilities.h
Calls: irlist_size() src/iroffer_utilities.c
  verifyshell() src/dinoex_utilities.c
Called by: a_adddir_sub() src/dinoex_admin.c
  a_autoaddann() src/dinoex_admin.c
  geoip_new_connection() src/dinoex_geoip.c
  http_check_country() src/dinoex_geoip.c

Global Function open_append()

open file to append data

int open_append ( const char* filename, const char* text )

Prototyped in: src/dinoex_utilities.h
Calls: outerror() src/iroffer_utilities.c
  __error(), open(), strerror()
Called by: add_password() src/dinoex_main.c
  admin_run() src/dinoex_jobs.c
  http_access_log_add() src/dinoex_http.c
  logfile_add() src/dinoex_misc.c
  write_removed_xdcc() src/dinoex_jobs.c

Global Function removenonprintable()

remove unknown control codes

size_t removenonprintable ( char* str )

Prototyped in: src/dinoex_utilities.h
Calls: __isctype()
Called by: ir_parseline() src/dinoex_irc.c
  voutput_fd() src/dinoex_admin.c
  vprivmsg_chan() src/dinoex_jobs.c
  xdcc_save_xml() src/dinoex_jobs.c

Global Function removenonprintablefile()

remove control codes and color

void removenonprintablefile ( char* str )

Prototyped in: src/dinoex_utilities.h
Called by: a_autogroup() src/dinoex_admin.c
  command_dcc() src/dinoex_user.c
References Variables: gdata src/dinoex_main.c

Global Function save_nick()

returns a nickname fail-safe

const char* save_nick ( const char* nick )

Prototyped in: src/dinoex_utilities.h
Called by: addtomainqueue() src/dinoex_queue.c
  h_guess_weblist() src/dinoex_http.c
  identify_needed() src/dinoex_irc.c
  privmsgparse2() src/dinoex_user.c
  u_runcmd() src/iroffer_admin.c

Global Function sizestr()

returns the size in a human readable form

char* sizestr ( unsigned int spaces, off_t num )

Prototyped in: src/dinoex_utilities.h
Calls: mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  snprintf()
Called by: a_announce_msg() src/dinoex_admin.c
  a_xdl_foot() src/dinoex_admin.c
  a_xdl_pack() src/dinoex_admin.c
  cie_info_pack() src/dinoex_ruby.c
  h_html_file() src/dinoex_http.c
  h_html_index() src/dinoex_http.c
  h_html_main() src/dinoex_http.c
  h_html_weblist_info() src/dinoex_http.c
  notice_transfer() src/dinoex_transfer.c
  noticeresults() src/dinoex_user.c
  p_disk_space_text() src/dinoex_config.c
  p_transfereddaily() src/dinoex_config.c
  p_transferedmonthly() src/dinoex_config.c
  p_transferedtotal() src/dinoex_config.c
  p_transferedweekly() src/dinoex_config.c
  read_statefile_llint() src/iroffer_statefile.c
  u_diskinfo() src/iroffer_admin.c
  u_info() src/iroffer_admin.c
  u_listdir() src/iroffer_admin.c
  xdcc_save_xml() src/dinoex_jobs.c
References Variables: size_units src/dinoex_utilities.c

Global Function strcmp_null()

strcmp fail-safe

int strcmp_null ( const char* s1, const char* s2 )

Prototyped in: src/dinoex_utilities.h
Calls: strcmp()
Called by: a_rehash_needtojump() src/dinoex_jobs.c
  sendxdlqueue() src/iroffer_misc.c
  u_rehash() src/iroffer_admin.c

Global Function timeval_to_ms()

convert a timeval into ms

ir_uint64 timeval_to_ms ( struct timeval* tv )

Prototyped in: src/dinoex_utilities.h
Called by: get_time_in_ms() src/dinoex_utilities.c
  initvars() src/iroffer_misc.c
  mainloop() src/iroffer_main.c

Global Function to_hostmask()

build a pattern to match this user and hostname

char* to_hostmask ( const char* nick, const char* hostname )

Prototyped in: src/dinoex_utilities.h
Calls: mydelete2() src/iroffer_utilities.c
  mymalloc2() src/iroffer_utilities.c
  mystrdup2() src/dinoex_utilities.c
  replace_char() src/dinoex_utilities.c
  snprintf(), strlen()
Called by: a_bann_hostmask() src/dinoex_admin.c
  a_get() src/dinoex_admin.c
  queue_host_remove() src/dinoex_admin.c
  t_check_duplicateip() src/dinoex_transfer.c
  t_checkminspeed() src/iroffer_transfer.c
  t_unlmited() src/dinoex_transfer.c
  telnet_accept() src/dinoex_telnet.c

Global Function user_getdatestr()

get local date and time in ISO

char* user_getdatestr ( char* str, time_t Tp, size_t len )

Prototyped in: src/dinoex_utilities.h
Calls: localtime(), strftime()
Called by: a_announce_msg() src/dinoex_admin.c
  a_chtime() src/dinoex_admin.c
  a_xdl_pack() src/dinoex_admin.c
  fnmatch_xdcc() src/dinoex_misc.c
  h_html_file() src/dinoex_http.c
  h_html_index() src/dinoex_http.c
  u_info() src/iroffer_admin.c
References Variables: gdata src/dinoex_main.c

Global Function verify_group_in_grouplist()

check if given group can be found in a list of allowed groups

unsigned int verify_group_in_grouplist ( const char* group, const char* grouplist )

Prototyped in: src/dinoex_utilities.h
Calls: __sbtoupper()
Called by: a_announce_channels() src/dinoex_admin.c
  add_newest_xdcc() src/dinoex_misc.c
  command_xdcc() src/dinoex_user.c
  get_download_pack() src/dinoex_user.c
  group_hidden() src/dinoex_admin.c
  group_is_restricted() src/dinoex_admin.c
  noticeresults() src/dinoex_user.c

Global Function verifypass2()

verify a password against the stored hash

unsigned int verifypass2 ( const char* masterpass, const char* testpass )

Prototyped in: src/dinoex_utilities.h
Calls: updatecontext_f() src/iroffer_utilities.c
  crypt(), strcmp(), strlen()
Called by: dcc_host_password() src/dinoex_chat.c
  h_admin_auth() src/dinoex_http.c
  msg_host_password() src/dinoex_user.c
  verifypass_group() src/dinoex_misc.c

Global Function verifyshell()

match a given file against a list of patterns

unsigned int verifyshell ( irlist_t* list, const char* file )

Prototyped in: src/dinoex_utilities.h
Calls: irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  updatecontext_f() src/iroffer_utilities.c
  fnmatch()
Called by: a_adddir_sub() src/dinoex_admin.c
  a_newgroup_sub() src/dinoex_admin.c
  check_fish_exclude() src/dinoex_jobs.c
  check_ignore() src/dinoex_irc.c
  command_dcc() src/dinoex_user.c
  dcc_host_password() src/dinoex_chat.c
  geoip_new_connection() src/dinoex_geoip.c
  get_download_pack() src/dinoex_user.c
  http_check_country() src/dinoex_geoip.c
  mainloop() src/iroffer_main.c
  msg_host_password() src/dinoex_user.c
  no_verifyshell() src/dinoex_utilities.c
  privmsgparse2() src/dinoex_user.c
  t_unlmited2() src/dinoex_transfer.c
  validate_crc32() src/dinoex_jobs.c
  verify_uploadhost() src/dinoex_upload.c

Local Function clean_missing_parts()

static void clean_missing_parts ( char** result, unsigned int part, unsigned int howmany )
Called by: get_argv2() src/dinoex_utilities.c

Local Function mylog_write_failed()

static void mylog_write_failed ( const char* filename )
Calls: outerror() src/iroffer_utilities.c
  __error(), strerror()
Called by: mylog_close() src/dinoex_utilities.c
  mylog_write() src/dinoex_utilities.c

Local Function replace_char()

static void replace_char ( char* str, unsigned int ch1, unsigned int ch2 )
Called by: to_hostmask() src/dinoex_utilities.c