Kevin Easton
87f24694b9
Remove unnecessary ns_init() function.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@149 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-10 11:22:14 +00:00
Kevin Easton
122849f247
Replace _getshort() and _getlong() with NS_GET16() and NS_GET32() respectively.
...
Fixes compilation on cygwin (and possibly other targets).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@148 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-08 12:53:16 +00:00
Kevin Easton
7978a87c9f
Change async DNS resolver code to register its file descriptor with the IO
...
core. This fixes /nslookup.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@147 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-08 11:24:48 +00:00
Kevin Easton
ed16081a2b
Remove bogus F_SETOWN use in /detach code.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@146 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-01 13:26:50 +00:00
Kevin Easton
5cf8ed2c79
Cleanup create_ipc_socket() and ensure it detects all errors in
...
connect_by_number(). Make function static since it is only used in one
source file.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@145 13b04d17-f746-0410-82c6-800466cd88b0
2012-02-01 13:21:47 +00:00
Kevin Easton
71cc2bf5f4
Add FORMAT_WHOIS_SECURE for SSL connection info from ratbox, unreal and freenode servers (RPL_WHOISSECURE). Does not support
...
hybrid yet because it uses numeric 275, which clashes with unreal's RPL_STATSDLINE.
RIP dmr.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@144 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-13 12:45:27 +00:00
Kevin Easton
15f6d8ac06
Pass through arguments of 338 numeric unchanged to script hook.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@143 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-06 09:48:10 +00:00
Kevin Easton
b355145d69
Add /FSET CHANNEL_URL to format the RPL_CHANNELURL (328) numeric sent by dalnet and atheme services.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@142 13b04d17-f746-0410-82c6-800466cd88b0
2011-10-04 12:47:01 +00:00
Kevin Easton
89b77f68fe
Cleanups and simplifications in mircansi(), removal of some more warnings.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@141 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-07 14:41:06 +00:00
Kevin Easton
206df688ba
Fix mircansi() so that it properly handles non-numeric characters
...
after a comma.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@140 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-07 12:48:35 +00:00
Kevin Easton
cc0a27d7fe
Rework stripansicodes() to take a const char * argument rather than const unsigned char *,
...
fixing a large number of warnings.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@139 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-07 10:13:18 +00:00
Kevin Easton
43aaf645e2
Use PC_SILENT macro in BX_prepare_command()
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@138 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-06 06:55:38 +00:00
Kevin Easton
736777bea3
Change instances of open-coded "3" in calls to prepare_command() with PC_SILENT macro.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@137 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-06 06:48:57 +00:00
Kevin Easton
02e4ced684
Add PC_TOPIC flag to prepare_command() for topic-change commands.
...
Clean up e_topic(), splitting out untopic() and using prepare_command()
to check for ops.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@136 13b04d17-f746-0410-82c6-800466cd88b0
2011-09-05 12:57:31 +00:00
Kevin Easton
83ac47c4f5
Minor cleanup for error_not_opped().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@135 13b04d17-f746-0410-82c6-800466cd88b0
2011-08-30 14:52:56 +00:00
Kevin Easton
c89a718fa1
Change the channel mode flags from const ints in names.c to #define macros in names.h.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@134 13b04d17-f746-0410-82c6-800466cd88b0
2011-08-30 14:50:42 +00:00
Kevin Easton
3f8952f20a
Fix some memory leaks that occur when clearing the URL-grabber list.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@133 13b04d17-f746-0410-82c6-800466cd88b0
2011-06-01 12:53:30 +00:00
Kevin Easton
52753a9e15
Further cleanups in the URL grabber - remove unnecessary globals, change
...
url_list from extern to static.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@132 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-17 14:16:34 +00:00
Kevin Easton
b628217600
Fix a memory leak in the URL grabber - as old URLs were expired from the list,
...
they weren't being freed.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@131 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-17 14:03:29 +00:00
Kevin Easton
41d0516849
Remove some dead code in funny_mode().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@130 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-16 13:16:25 +00:00
Kevin Easton
1569a5233f
Fix a regression with the previous changes to $help() - topics with embedded
...
spaces are enclosed in quotes eg. $help("cdcc tresend").
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@129 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-03 11:55:34 +00:00
Kevin Easton
7c36bdd4ad
Cleanups to $help() function, removing some half-baked functionality that
...
never worked properly. Search LOAD_PATH for the SCRIPT_HELP file.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@128 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-02 12:34:39 +00:00
Kevin Easton
c5b5fdd4af
Sort the chelp index after loading - ensures that all topics are reachable.
...
Use correct define for PUBLIC_ACCESS.
Some cleanups - separate out help index freeing, change get_help_topic() to return
void.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@127 13b04d17-f746-0410-82c6-800466cd88b0
2011-05-02 11:43:38 +00:00
Kevin Easton
1838a37a6c
Cleanups in get_help_topic(). Topic now displays correctly, rather than the
...
argument supplied to /bhelp.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@126 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-18 14:30:03 +00:00
Kevin Easton
ab170a123d
Further simplifications and improvements to the chelp code.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@125 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-18 12:54:13 +00:00
Kevin Easton
47ce4ab1e1
Apply changes to BitchX.help from t3gah.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@124 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-18 12:38:21 +00:00
Kevin Easton
09c34c045f
Further cleanups and fixes in chelp.c:read_file(). Now properly adds NULLs to
...
terminate the lists, that the code in get_help_topic() expects to be there -
fixes a potential crash in /bhelp.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@123 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-17 11:58:16 +00:00
Kevin Easton
df5547af72
Add .xxx TLD to country(), and some more const-correctness.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@122 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-17 03:33:00 +00:00
Kevin Easton
780ac2c149
Cleanup and rename replace_color() to put_color(), including sanity-checking of
...
foreground color code - this ensures that if a wild color code makes it this
far, it doesn't crash the client.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@121 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-08 13:10:05 +00:00
Kevin Easton
fd9980b9c7
Fix spelling mistake.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@119 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-08 12:29:55 +00:00
Kevin Easton
7f293687b1
Correct help text for /bhelp, reported by t3gah.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@118 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-05 23:24:22 +00:00
Kevin Easton
9b92ec3c11
Cleanups and simplifications in read_file().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@117 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-05 11:59:06 +00:00
Kevin Easton
c816dcec22
Add missing entry for new USERMODE_OTHERS /fset.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@116 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-05 05:47:49 +00:00
Kevin Easton
3f0ef54b18
Remove some dead code and add a sanity check to create_fsets().
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@115 13b04d17-f746-0410-82c6-800466cd88b0
2011-04-05 05:45:20 +00:00
Kevin Easton
c45c6a69bf
Cleanup p_mode() and correct handling of user mode changes where the source
...
and the target aren't the same (reported by gauze). This doesn't happen
on standard servers, but is used by services on some networks.
Adds /FSET USERMODE_OTHER.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@114 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-31 22:20:21 +00:00
Kevin Easton
719279790e
Add some more TLDs to $country(), synchronised with the IANA list: .ax, .eu,
...
.me, .rs, .tl, .asia, .cat, .jobs, .tel and .travel.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@113 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-31 08:32:23 +00:00
Kevin Easton
b17b09949b
Improve country() by using "static const" for lookup table (makes function 25% smaller)
...
and const-correctness. Add .mobi TLD.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@112 13b04d17-f746-0410-82c6-800466cd88b0
2011-03-23 11:17:23 +00:00
Kevin Easton
94550b1fac
Changelog update - Irix fixes.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@111 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:41:50 +00:00
Kevin Easton
3aa7f7765f
Remove non-standard arithmetic on void *, and get offsetof() from <stddef.h> instead
...
of rolling our own.
Fixes building on Irix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@110 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:34:13 +00:00
Kevin Easton
b43ecbaa85
Improve memory allocation routines to fix alignment and remove non-standard
...
void * arithmetic.
Fixes compilation on Irix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@109 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:15:29 +00:00
Kevin Easton
08cca81993
Rework cset functions to remove non-standard void * arithmetic.
...
Fixes compiling on Irix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@108 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:13:54 +00:00
Kevin Easton
fc33f520ae
Remove non-standard void * arithmetic (fixes compilation with Irix compiler).
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@107 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 12:11:03 +00:00
Kevin Easton
9f3256cac7
A few updates to the quit messages.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@106 13b04d17-f746-0410-82c6-800466cd88b0
2011-02-02 11:11:28 +00:00
Kevin Easton
6711ef7f00
Correct use of IN6ADDR_ANY_INIT initialiser, fixes IPv6 build on Intel ICC.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@105 13b04d17-f746-0410-82c6-800466cd88b0
2010-12-16 21:15:15 +00:00
Kevin Easton
d1e13bc526
Show correct message ("Remote end closed connection") when we get EOF
...
on a socket.
I also added a wrapper function around strerror() for dgets_errno, since
we did the same thing in a few places. This all needs to be cleaned up
a little - the -1 value we use could in theory clash with an actual
errno error number.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@104 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-30 13:26:06 +00:00
Kevin Easton
7a59da1f2e
Add /FSET WHOIS_CALLERID for +g mode notification on hybrid & ratbox.
...
This is numeric 716. Hybrid shows it in WHOIS, and both show it when you
try to PRIVMSG someone who is +g (similar to AWAY). So I've formatted it
to match the WHOIS block.
I also took the chance to fix up the ordering of the fsets, and remove
a bunch of redundant setting of default values.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@103 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-30 12:48:28 +00:00
Kevin Easton
5430be4c78
Add RPL_WHOISHOST (378) numeric from Unreal (and freenode).
...
Formats with /fset WHOIS_ACTUALLY.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@102 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-20 12:30:55 +00:00
Kevin Easton
4fab4aaebf
Add svn:ignore Makefile to ignore generated Makefiles in plugin directories.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@101 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-10 13:35:49 +00:00
Kevin Easton
06c8ccdf3c
Remove empty 'mail' directory (old plugin?)
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@100 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-09 01:11:17 +00:00
Kevin Easton
2f92982eac
Build script fix to allow plugins to build on x86-64.
...
$(SHLIB_CFLAGS) is required on the compile line, not just the link line.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@99 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-09 01:08:14 +00:00