Commit Graph

57 Commits

Author SHA1 Message Date
Pierre-Louis Bonicoli f2fd1824ca
Format the whole code using clang-format 2022-03-10 14:21:01 +01:00
Loïc Gomez 26d347dec6
sanitize: fix const char * being used as non-const 2022-03-10 14:20:52 +01:00
Loïc Gomez f54775fe92
sanitize: ignore warnings related to external libs 2022-03-10 14:20:32 +01:00
Loïc Gomez ce4cf8b6a0
sanitize: add bip_clock_gettime util function 2022-03-10 14:20:26 +01:00
Loïc Gomez dd5343b710
use proper types, safe casts (mostly size_t) 2022-03-10 14:20:12 +01:00
Loïc Gomez 2a5e7b6f7b
sanitize: add trivial casts to types
and add missing default cases
2022-03-10 14:19:57 +01:00
Loïc Gomez 34b3c4b0c3
Move /BIP to bip_strcat{,f}_fit memccpy wrapper
instead of snprintf.
2022-03-10 14:19:28 +01:00
Pierre-Louis Bonicoli 814d54c676
use strftime instead of snprintf wherever possible 2018-12-12 03:02:21 +01:00
Arnaud Cornet 40233ff938 Fewer configure options.
Use pkg-config to detect openssl.
Eagerly use backtrace if provided by libc.
2018-11-18 14:30:17 -05:00
Arnaud Cornet 03ee43ca89 [BUG] fatal() on nick change on gamesurge network
Some time gamesurge sends a "foo NICK :foo" which we didn't handle
correctly.
2009-11-15 20:14:28 +00:00
Arnaud Cornet eef2fd180d [CLIENTHACK] Remove xchat's + and - on each msg
This patch drops CAPAB setting in 005 message from server to client.
Doing this xchat does not start the mode that prepends a + or a - at the
beginning of PRIVMSGS.
2009-02-02 19:47:53 +01:00
Arnaud Cornet 03210a796e [CLEANUP] Add lots of asserts in utils
list hash and array types are now even stricter on their usage.
2009-01-22 12:06:26 +01:00
Ben Byer dae6cad3f7 Add limit.h for INT_MAX 2009-01-22 11:26:03 +01:00
Arnaud Cornet 3b704f53c4 drop unused variables 2009-01-15 22:56:42 +01:00
Arnaud Cornet 0600196102 merge master 2009-01-05 23:24:49 +01:00
Arnaud Cornet 0ecb77617c Sanitize bip_(m|re)alloc size. 2008-12-29 15:31:32 +01:00
Arnaud Cornet 3f895fa6ea Merge branch 'master' into bip08 2008-12-29 09:15:44 +01:00
Arnaud Cornet b222196b18 Use backtrace when --enable-debug=yes and avail.
I KNOW AUTOCONF.
2008-12-28 15:47:43 +01:00
Arnaud Cornet c0db3c408d Merge fixups 2008-12-28 14:47:44 +01:00
Arnaud Cornet 24110a58dc Fix leak + cleanup list_append.
Thanks to TheMIROn for spotting the leak.
2008-12-28 14:45:44 +01:00
Arnaud Cornet 3c810eef53 Refactor log system. prepare for /backlog 1 hour 2008-12-26 18:43:35 +01:00
Arnaud Cornet b102aed08a array_extract: fix braindeadness. 2008-12-25 17:49:48 +01:00
Arnaud Cornet 7c6cc20e90 Use hash_it_key cause now hash items can be null. 2008-12-20 21:15:04 +01:00
Arnaud Cornet e8bb841e5f refactor nick management code
- drop struct nick.
- follow nick changes in a basic way.
  right now it does not work if one changes nick and somebody else takes
  the old unused nick.
2008-12-20 17:59:16 +01:00
Arnaud Cornet 4d231e8ddc Inline most array methods 2008-12-20 14:28:18 +01:00
Arnaud Cornet d3ef106c4f New array type, cleanupts and rename logfilegroup log_store 2008-12-20 14:20:50 +01:00
Arnaud Cornet 4b723ca479 more cleanups, start of a log refactoring
That changes log format and might breack everything.
2008-12-18 14:27:16 +01:00
Arnaud Cornet c150151066 BIG cleanup. check for memory allocation failure, add extra checks all arround. 2008-12-15 19:19:27 +01:00
Arnaud Cornet e18d335578 calloc/realloc checks. 2008-12-11 11:00:05 +01:00
Arnaud Cornet 3ab2755767 Catch malloc returning NULL. 2008-12-10 23:26:37 +01:00
Loc Gomez 671a455219 Fix UTF-8 in all files 2008-01-09 23:45:40 +01:00
Arnaud Cornet c5d1f537e4 Null deref fixes when fetching info. 2008-01-05 23:25:24 +01:00
Arnaud Cornet 8b8024b81e Make it even build. 2007-12-29 18:17:50 +01:00
Arnaud Cornet 95618a06ab Fix stuuuuuupid leak in hash_clean. 2007-12-29 18:15:03 +01:00
Loïc Gomez 0876e783f3 is_valid_nick fix. small validate_config fix 2007-11-14 22:03:58 +01:00
Arnaud Cornet 664ebb68a7 Destroy unused link after sighup 2007-10-21 19:35:22 +02:00
Arnaud Cornet 0abd8a386d Config load fixes.
- Leaks
- Better logging
- Handle historical configs
2007-10-21 12:31:07 +02:00
Arnaud Cornet 32e47b900c Fixes to get the /BIP RELOAD command to at least work in a quick test.
- reuse existing channel infos
- dont clear conn_list on end of irc_main and don't add the listener if
conn_list is not empty at start of irc_main
2007-10-20 23:12:22 +02:00
Arnaud Cornet b026214142 Various fixes
- Fix log redirrect to stderr when not going into background.
- Fix connection_close to handle connections on error.
- Handle servers you can't connect to the same way as servers that get disconnected. (wrt to reconnection timers)
- Fix some log message
2007-10-20 21:26:21 +02:00
Loc Gomez 6ab2bb5146 * src/sample: Update manpage, sample config and sample bip.vim + typo
* src/bip: warn the user about rlimits upon start and whenever they're
reached
* src/bip: add -v flag (show version)
* src/bip: add admin option to user block, and restrict some commands to
admins. Log whenever a /bip command is used
* src/bip: enhance /BIP LIST and HELP commands, add INFO command
* src: fix defaults user/nick/realnames not loaded into connections,
resulting in segfault (WRITE_LINE1 to NULL) and oidentd.conf file not
containing usernames
* src: add default.h and version.h
* src: fflush() system log every log_sync_interval
* src/bip: fix "Resetted." printed whenever a client talks with
backlog_reset_ontalk true
* src/bip: fix backlog user options not set to defaults in add_user
* src/bip: fix oidentd.conf config written lately. Still some issues
* src/util: add human readable time hrtime(), bool2text() and ssl
checlmode2text() functions
* src: lower RECONN_TIMER + add RECONN_TIMER_MAX option
* src/bip: code some validate_config
2007-09-26 14:45:30 +02:00
nohar 6273cf2d59 Add configuration directive to be able not to log bip information (not irc related, that is) 2007-07-01 12:43:09 +00:00
nohar 56fd224916 Lot's of cleanups. 2007-05-26 10:31:44 +00:00
nohar 965aeb9f6a Fixed a compile warning. 2007-01-28 18:35:30 +00:00
nohar a31562f519 Bug fix in nick channel nick tracking 2007-01-27 12:30:12 +00:00
nohar 006f5c07e5 I forgot that my hash lib function was braindead. 2007-01-05 22:20:17 +00:00
nohar 5c17d27a95 Re-think who_count management.
Should fix hard to trigger bug: fatal("negative who_count").
2007-01-05 21:19:32 +00:00
nohar 4e12ff1c94 Hash fonction just for fun. 2006-12-08 21:08:23 +00:00
nohar e3410afe93 Now it even build 2006-09-18 18:05:17 +00:00
nohar 925bee51c8 Untested no_client_away_msg support. 2006-09-18 16:06:23 +00:00
nohar 5574a6d335 a few deleted whitespaces + Trou's patch: allows to trust when not connected / allow self-signed certs when in basic ssl mode / permit connection to serveurs w/o a motd 2005-12-12 19:03:02 +00:00