Commit Graph

516 Commits

Author SHA1 Message Date
Kevin Easton
56d5c9e643 Add a "const" qualifier to get rid of some warnings.
(*why* is the return value of inet_ntop() const char *? it just returns a
pointer to the user-supplied char * parameter!)



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@86 13b04d17-f746-0410-82c6-800466cd88b0
2010-06-26 08:01:55 +00:00
Kevin Easton
1a0e5ec166 The /cd command now handles getcwd() failing (eg if the current directory
has been removed).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@85 13b04d17-f746-0410-82c6-800466cd88b0
2010-05-02 08:18:29 +00:00
Kevin Easton
38cd097631 Remove symlinks from repository - not needed, Makefile regenerates 'em.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@84 13b04d17-f746-0410-82c6-800466cd88b0
2010-03-23 14:12:28 +00:00
Kevin Easton
8c099a4ce3 Fix alloca build warnings on freebsd (backport from epic).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@83 13b04d17-f746-0410-82c6-800466cd88b0
2010-03-07 07:24:12 +00:00
Kevin Easton
abb5e06233 Modify the RPL_WHOISACTUALLY numeric handling to work on Bahamut as well.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@82 13b04d17-f746-0410-82c6-800466cd88b0
2009-12-10 13:07:23 +00:00
Kevin Easton
0770358394 Correct misuse of RETURN_STR macro in function_gettmatch.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@81 13b04d17-f746-0410-82c6-800466cd88b0
2009-11-24 12:06:54 +00:00
Kevin Easton
7ac4b8520c Convert my_stricmp, my_strnicmp and wild_match from unsigned char * to char *.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@80 13b04d17-f746-0410-82c6-800466cd88b0
2009-11-24 10:21:30 +00:00
Kevin Easton
f8c9021184 Fix minor memory leak in banlist.c:delay_flush_all.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@79 13b04d17-f746-0410-82c6-800466cd88b0
2009-11-18 10:30:46 +00:00
Kevin Easton
db57885dfb Fix the definition of AC_CHECK_PLUGIN_SUPPORT in aclocal.m4, which was
making configure break on FreeBSD 9 (reported FreeBSD bitchx port maintainer
cpet <chris@officialunix.com>).



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@78 13b04d17-f746-0410-82c6-800466cd88b0
2009-11-18 10:13:19 +00:00
Kevin Easton
b2a282feaa Fix a refcounting issue in the whowas list handling.
When a user in one of the whowas lists rejoins, their entry is removed from
the whowas list (and added to a channel nicklist).  However the count of
entries in the whowas list wasn't being decremented, so eventually the client
thinks the lists are full when they're really empty... at this point only one
user at a time can be in the lists (so /WHOLEFT after a netsplit would only
show one user).



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@77 13b04d17-f746-0410-82c6-800466cd88b0
2009-10-16 12:35:56 +00:00
Kevin Easton
cb306c8947 Changelog entry for /hostname fix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@76 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-27 12:48:25 +00:00
Kevin Easton
4e72a992b4 Fix argument-handling for the /hostname (/irchost) command - now you can do
/hostname 2 instead of /hostname #2.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@75 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-27 12:45:28 +00:00
Kevin Easton
eab1834e64 Add 0::1 to list of ipv6 addressed ignored as vhost candidates.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@74 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-27 12:06:31 +00:00
Kevin Easton
5337b226fa Change the handle_server_stats so that the averages (eg. users per
channel) are correctly rounded. Added a divide_rounded() function
that rounds to nearest integer.  This also gets rid of the messy
floating point divisions in that function.



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@73 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-22 22:35:23 +00:00
Kevin Easton
0fc23ba148 Reinstate a new version of RPL_WHOISACTUALLY numeric handling.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@72 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-21 14:14:28 +00:00
Kevin Easton
771b2af59d Fixed two places where the client compared the source of a numeric against
get_server_name(from_server) instead of get_server_itsname(from_server) -
this meant that if the client had a different idea of the local server name
from the server (say, if you used a round-robin to connect), then the client
would incorrectly assume the numeric came from a remote server.

The symptoms were:

 * If your local server sent you a "you're not op" type message, BitchX would
report the channel had desynched.

 * If your local server send you a "channel doesn't exist" numeric (eg. if
you typed /mode #nosuchchannel to see if it existed), BitchX would not show
it. 


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@71 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-19 14:24:15 +00:00
Kevin Easton
e338d2d9fd Fix the $servernum() function - no matter what string
you gave it, it would return the first server in the list
where server.itsname == server.name, due to a misplaced
variable.  It also returned an empty string for
$servernum(  ) when it should return the current server.

Also removed the useless function_serverport() function -
it was a character-for-character duplicate of
function_servports().


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@70 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-17 13:38:09 +00:00
Kevin Easton
4decd6202b Fix snprintf buffer size.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@68 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-08 13:40:45 +00:00
Kevin Easton
eb13453e50 Fix snprintf() call in /QUIT to make glibc2.9 happy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@67 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-08 13:22:27 +00:00
Kevin Easton
a6636dd449 Add missing third parameter to open().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@65 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-08 12:44:03 +00:00
Kevin Easton
7a046f56ab Add missing third argument to open().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@64 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-08 12:37:39 +00:00
Kevin Easton
ef503e318e Fix .cmsg crash reported by zimzum.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@62 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-02 14:14:21 +00:00
Kevin Easton
c0d80d4c8c Merge updated server list from 1.1 branch.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@61 13b04d17-f746-0410-82c6-800466cd88b0
2009-08-15 11:21:48 +00:00
Kevin Easton
1b370475ec Fixed the defaults for JOIN_NEW_WINDOW_TYPE and QUERY_NEW_WINDOW_TYPE.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@59 13b04d17-f746-0410-82c6-800466cd88b0
2009-08-11 14:08:53 +00:00
Kevin Easton
147ea72710 Some cleanups in quit message handling. Fixed a bug where a quit from a user
that isn't in a channel with the client (god knows how *that* happens, but
someone reported the bug...) could crash the client, because a NULL pointer 
is passed to logmsg().  The bug didn't show under glibc because it handles
the NULL pointer OK.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@58 13b04d17-f746-0410-82c6-800466cd88b0
2008-07-07 11:55:00 +00:00
Kevin Easton
8eb0a4fb3d More parantheses to suppress a gcc warning.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@57 13b04d17-f746-0410-82c6-800466cd88b0
2008-07-05 09:52:33 +00:00
Kevin Easton
1cba960190 Cleaned up the handling of channel mode changes a little, including fixing
buggy handling of certain key and limit mode changes.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@56 13b04d17-f746-0410-82c6-800466cd88b0
2008-07-04 09:55:59 +00:00
Kevin Easton
06f23669c6 Fix bug where you got disconnected if the server sent a 464 numeric
(bad password) that the client wasn't expecting.

The most common case is failing a CHALLENGE oper attempt.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@55 13b04d17-f746-0410-82c6-800466cd88b0
2008-07-02 09:48:22 +00:00
Kevin Easton
47e2d446fe Add parantheses to make gcc happy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@54 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-14 06:57:51 +00:00
Kevin Easton
df93dcbbc0 Add /HOP and /DEHOP commands for halfop. Also did a little cleanup around
doop() and dodeop() - they could do with a bit more though.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@53 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-14 06:51:03 +00:00
Kevin Easton
708e4b6f19 Change NICKSORT_OP to NICKSORT_STAT (sorts nicks by channel status -
chanop first, then halops, voices and others).  Added /SCAN -stat
to sort nicks using NICKSORT_OP.  Removed NICKSORT_VOICE - it was broken
anyway.

Removed "scan" plugin, this functionality is now covered by /SCAN -stat.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@52 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-14 06:45:05 +00:00
Kevin Easton
5ecddf62fd Update Changelog for recent commits.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@51 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-12 14:57:03 +00:00
Kevin Easton
b5741b6ee2 Add %G (halfop symbol) to the default status line.
Also change the meaning of %= in the status line so that the voice
symbol is shown whether or not the user is opped.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@50 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-12 14:55:00 +00:00
Kevin Easton
62e70f98e2 Add halfop (%) support to the $channel() scripting function.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@49 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-12 14:52:16 +00:00
Kevin Easton
b057339be6 Substantial rewrite of /SCAN (do_scan). Now provides total channel nick
count as well as filtered nick count to the header and footer formats -
default header formats updated to show it.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@48 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-12 14:50:45 +00:00
Kevin Easton
bca8ce0a1c Fix call to RESIZE.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@47 13b04d17-f746-0410-82c6-800466cd88b0
2008-06-05 14:16:16 +00:00
Kevin Easton
1e81f1ed7b Rework formatting of /NAMES and /SCAN output.
The formatting of /NAMES and /SCAN output has been substantially reworked.
The old /FSETs NAMES_BOTCOLOR, NAMES_FRIENDCOLOR, NAMES_NICKCOLOR,
NAMES_OPCOLOR, NAMES_SHITCOLOR and NAMES_VOICECOLOR have been replaced
with these new /FSETs:

....................NAMES_NICK %B$[10]0
................NAMES_NICK_BOT %G$[10]0
.............NAMES_NICK_FRIEND %Y$[10]0
.................NAMES_NICK_ME %W$[10]0
...............NAMES_NICK_SHIT %R$[10]0
....................NAMES_USER %K[ %n$1-%K]
.............NAMES_USER_CHANOP %K[%C$0%n$1-%K]
..............NAMES_USER_IRCOP %K[%R$0%n$1-%K]
..............NAMES_USER_VOICE %K[%M$0%n$1-%K]

The NAMES_NICK formats control how the nick itself is displayed, depending
on the status of the nick as recognised by BitchX (the priority order is
NAMES_NICK_ME > NAMES_NICK_BOT > NAMES_NICK_FRIEND > NAMES_NICK_SHIT >
NAMES_NICK).  The NAMES_USER formats control how the overall entry appears in
the /NAMES or /SCAN line, depending on the channel status of the nick (the
priority order is NAMES_USER_CHANOP > NAMES_USER_VOICE > NAMES_USER_IRCOP >
NAMES_USER).

You'll need to update any scripts or custom formats that altered the old
formats.  If you just use the defaults, the main difference you'll see is
that your own nick is now shown in white, and voiced users are shown with
the '+' sent by the server instead of the 'v'.  You can go back to the old
look by setting these formats:

/FSET NAMES_NICK_ME %B$[10]0
/FSET NAMES_USER_VOICE %K[%Mv%n$1-%K]



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@46 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-27 04:53:19 +00:00
Kevin Easton
56a414feb6 Spelling fix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@45 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-15 09:21:40 +00:00
Kevin Easton
0d11b0afbe Modify /scan family of commands. Now shows halfops, /scans for shitlist
works, and a few other changes.  Some things might look a bit hinky,
more work needed.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@44 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-08 14:35:15 +00:00
Kevin Easton
0ce64de737 Show % (halfops) correctly in /names.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@43 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 23:02:29 +00:00
Kevin Easton
e10dcbe7e2 If using recursive cparse, a %c character in the format string inserting
a % or $ should quote it (like %s does).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@42 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 23:02:07 +00:00
Kevin Easton
dbfde76622 Update Changelog.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@41 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 11:11:41 +00:00
Kevin Easton
d809649484 Merge r23 from branches/ircii-pana-1.1
Changes to allow compiling on gcc-4.0.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@40 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 11:07:31 +00:00
Kevin Easton
cc9073707e Merge r22 from branches/ircii-pana-1.1
Fix spelling error in dcc.c


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@39 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 11:00:16 +00:00
Kevin Easton
ee2fe058c2 Merge r11,r12,r13 from branches/ircii-pana-1.1
Implements new method to find vhosts (fixes CVE-2007-5839).


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@38 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 10:57:26 +00:00
Kevin Easton
9beb1dcd55 Merge r6 & r7 from branches/ircii-pana-1.1
This is the convert_output_format_raw changes that fix CVE-2007-4584.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@37 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 10:48:02 +00:00
Kevin Easton
a9267d0716 Merge r5 from branches/ircii-pana-1.1 (fixes for CVE-2007-3360).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@36 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 10:26:50 +00:00
Kevin Easton
ec0201e8a5 Update Changelog.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@35 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 09:19:25 +00:00
Kevin Easton
285b02c36a Add $ishalfop(<nick> <channel>) scripting function, as per EPIC.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@34 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 08:48:49 +00:00
Kevin Easton
998453de9f Remove declaration of stpcpy - no code in BitchX uses it.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@33 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 08:46:59 +00:00