1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00
Commit Graph

911 Commits

Author SHA1 Message Date
LemonBoy
1a2c479bc0 Allow the user to set and modify the SASL parameters
The /NETWORK ADD command now is able to modify the SASL mechanism, the
username and the password on a chatnet basis.
2015-09-26 18:53:10 +02:00
Geert Hauwaerts
fc3c0a8420 Merge pull request #301 from dequis/dcc-get-ntfs-temp-bug
dcc-get: close() the temp fd so we don't get ETXTBSY in ntfs mounts
2015-09-24 10:05:30 +02:00
Robert C Jensen
b984f1fa25 dcc-get: close() the temp fd so we don't get ETXTBSY in ntfs mounts
Patch from debian bug 696963 [1]

Fixes github bug #220 and flyspray bug 867 [2]

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696963
[2]: http://bugs.irssi.org/index.php?do=details&task_id=867
2015-09-23 23:39:37 -03:00
dequis
7ae7422939 Add multi-prefix to list of capabilities to request
Turns out event_names_list() in irc-nicklist.c already handles this.

event_who() just ignores it, which is probably a good idea since some of
the irc servers I tested this with have a bug that results in sending
multiple prefixes in the NAMES reply but not in the WHO one (they were
forks of ircd-hybrid before 7.3.0)

And NAMES always happens, anyway. WHO is omitted sometimes for huge
channels.
2015-09-23 03:17:29 -03:00
ailin-nemui
f5f3d7cc98 Revert "Network and IPv{4,6} related changes" 2015-09-22 21:59:17 +02:00
ailin-nemui
2d69deb0a3 Merge pull request #290 from LemonBoy/ipv6
Network and IPv{4,6} related changes
2015-09-22 17:43:31 +02:00
ailin-nemui
211e84c1e9 Merge pull request #267 from kyak/master
Add expandos for hostname
2015-09-21 18:47:09 +02:00
LemonBoy
ffaa890e99 Initial work to make irssi respect the resolved ip order
Ip's aren't selected using random() anymore, also select the ip version
by using getaddrinfo and some proper hints.
2015-09-21 14:19:35 +02:00
dx
0912a11050 Merge pull request #278 from LemonBoy/sasl
SASL support
2015-09-20 19:19:49 -03:00
LemonBoy
203c00938a Use formats instead of g_warning
Add some copyright headers here and there too.
2015-09-21 00:04:37 +02:00
Alexander Færøy
a44c4b82de
More format warnings removed. 2015-09-20 23:11:39 +02:00
Alexander Færøy
6c9dcffb5e
Fix formatting warnings. 2015-09-20 22:51:13 +02:00
Alexander Færøy
be977bf1b7
Fix warning. 2015-09-20 21:21:40 +02:00
Alexander Færøy
1079ad46d2
Use g_string_append() instead of g_string_append_c() for string. 2015-09-20 21:12:07 +02:00
Alexander Færøy
ca363efe00
Use g_string_append() instead of g_string_append_c() for string. 2015-09-20 21:01:25 +02:00
LemonBoy
06040fb30b Merge remote-tracking branch 'origin' into sasl 2015-09-19 23:58:16 +02:00
Jari Matilainen
9586766d87 Add setting to configure rejoin on reconnect behaviour
Closes #169
2015-09-19 18:34:05 -03:00
ailin-nemui
2b13e793c4 Merge pull request #259 from dequis/irssiproxy
Updates for irssiproxy
2015-09-19 02:53:25 +02:00
LemonBoy
24d32c28ee Don't handle 908 as a critical failure
"if the mechanism is unknown, 908 is optional, 904 (or equivalent error condition) is required"
2015-09-11 23:21:33 +02:00
LemonBoy
49c4ea5fd9 Parse the error string received by the server
So that in case of SASL failure the user sees a nice error message.
2015-09-11 23:20:07 +02:00
LemonBoy
1f114d75c6 Consider the SASL handshake successful on 903 2015-09-11 23:17:46 +02:00
LemonBoy
55387dd93d Handle event 906 and 908 2015-09-11 22:23:38 +02:00
LemonBoy
6645d0d38d Explicitly set the authorization id during the PLAIN handshake
On error show the user the message sent by the server.
2015-09-11 22:09:47 +02:00
LemonBoy
171b67441d Replace spaces with tabs 2015-09-11 01:17:18 +02:00
LemonBoy
c90c7deac3 Address all the points outlined in the first review
Replace G_SOURCE_REMOVE with FALSE for the compatibility sake.
Zero the timeout id after g_source_remove and when exipred.
Save the sasl_* options in sig_chatnet_saved().
2015-09-11 01:07:43 +02:00
LemonBoy
b8d3301d34 SASL support
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet.
2015-09-11 00:30:16 +02:00
Alexander Færøy
7b46dae182 Merge pull request #248 from LemonBoy/chantypes
Implement CHANTYPES support
2015-09-10 01:37:08 +02:00
LemonBoy
21c1e4e9f8 Fix two minor issues outlined in the PR#222
irc-cap.c has now a licence header.
A minor style fix in misc.c
2015-09-02 22:40:10 +02:00
LemonBoy
35d30c19a1 Whitespace fix 2015-09-02 20:24:47 +02:00
kyak
2f9cca8ec6 Remove extra line break
How did this extra break cripple in here?
2015-08-29 15:40:17 +03:00
kyak
b065f2a011 Use HOST_NAME_MAX for userhost and hostname expandos
Use HOST_NAME_MAX instead of hardcoded 100 for userhost
and hostname expandos.
2015-08-29 15:36:05 +03:00
kyak
b7d82ecdce Use "(none)" as fallback for hostname and userhost expandos
Use "(none)" instead of "??" for hostname and userhost expandos
when these can't be reliably detected.
2015-08-29 15:32:22 +03:00
kyak
19760679eb In expando_hostname, set *free_ret to TRUE
*free_ret must be set to TRUE in both cases, since we return
some newly initialised memory
2015-08-29 15:29:57 +03:00
kyak
0435331912 Clean up in hostname expando before return
Clean up the vector resulting from g_strsplit before
returning from expando_hostname(). Also, use g_strdup()
instead of g_strconcat() to return the pointer to hostname.
2015-08-26 09:34:48 +03:00
Alexander Færøy
d2c9f30977 Merge pull request #222 from LemonBoy/cap-support
[RFC] CAP support
2015-08-24 22:22:01 +02:00
LemonBoy
b0e7c18376 Send the CAP LS after sending the proxy strings
Patch by @dequis
2015-08-20 23:37:34 +02:00
blha303
92d03fe11e Replace \n with \r\n in irssiproxy source, fixes bug 2015-07-25 02:41:26 -04:00
kyak
8e71d6ec73 Add expandos for hostname
See http://bugs.irssi.org/index.php?do=details&task_id=829
2015-07-19 09:45:50 +03:00
dequis
51496cd09f Fix 'address already in use' when changing irssiproxy_ports
When changing the value of irssiproxy_ports to use a different network
name in a port that was already bound (so like changing from asd=6667 to
sdf=6667) it would throw "address already in use".

This fixes it by delaying the add_listen() calls after all the
remove_listen() were called.
2015-06-14 17:00:35 -03:00
dequis
a47f45b5b7 Rename /proxy command to /irssiproxy for clarity 2015-06-14 11:57:11 -03:00
dequis
29fb0d9802 Merge branch 'master' into irssiproxy
Conflicts:
	src/irc/proxy/listen.c
2015-06-14 10:42:41 -03:00
Geert Hauwaerts
4cc6fdaaab Add server check in irc_server_connect (#208)
Fail instead of crash, if irc_server_connect is called without object.
(#208)
2015-06-12 17:44:13 +02:00
LemonBoy
e480b9b165 Improve ischannel_func (#253)
The function now skips all the leading characters that are in the STATUSMSG. If
the server didn't send the STATUSMSG option then it's assumed to be "@+" for
compatibility with bahamut 2.4 (sic).
2015-05-31 15:30:21 +02:00
LemonBoy
16c71cf1fb Implement CHANTYPES support 2015-05-15 17:07:30 +02:00
LemonBoy
2d7030a844 Implement support for IRCv3.1 CAP negotiation 2015-05-05 23:14:26 +02:00
Alexander Færøy
eb0f09073c Merge pull request #199 from ailin-nemui/config-parser
Make config parser more robust
2015-04-17 21:23:03 +02:00
dequis
f14199d9c1 Change all strcmp() to g_strcmp0() to handle nulls gracefully
Just a string replacement (but i did check every one of them)

    sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
2015-04-07 22:41:05 -03:00
Hans Nielsen
7beffbdcc5 Add help files for proxy module 2015-02-24 19:53:23 -08:00
Hans Nielsen
bbf404b611 Fix whitespace 2015-02-24 19:53:23 -08:00
Hans Nielsen
6a28bad814 Add boolean toggle for irssiproxy being enabled 2015-02-24 19:52:17 -08:00
Hans Nielsen
aaa0f73eac Make proxy messages include more detail and add status command 2015-02-24 19:52:17 -08:00
Hans Nielsen
d27c54486f Change around connection signals in proxy module
Change "proxy client connected" to "proxy client connecting" to avoid being confused by clients that have connected but not necessarily authenticated. Emit "proxy client connected" once authenticated, keeping the name for backwards compatibility.
2015-02-24 19:52:17 -08:00
Ailin Nemui
96d4fb9156 add CONFIG_REC to config_node_section* APIs
this adds the CONFIG_REC * to the config_node_section and
config_node_section_index APIs as they will require access to the config
cache later on to make the config parser more robust.
2015-02-17 09:50:55 +01:00
mauke
b4b4ebfadf accept freenode extbans in /ban [#150] 2015-02-08 22:16:01 +01:00
Alexander Færøy
9abdeb8611 Merge pull request #152 from sebth/master
Try to split long lines on spaces
2015-01-05 01:03:58 +01:00
Veres Lajos
f285332c5b typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-08 22:26:53 +00:00
Sebastian Thorarensen
f81a54b937 Try to split long lines on spaces
Try to split long lines on spaces to avoid words being splitted. This
can be turned off with the option `split_line_on_space'. The code
assumes that the terminal encoding has ASCII spaces.
2014-10-19 17:03:20 +02:00
Alexander Færøy
3d6051a03e Merge pull request #140 from sebth/master
Make line splitting fail-safe
2014-10-01 21:55:56 +02:00
Alexander Færøy
a2121efed3 Merge pull request #142 from dequis/away-with-no-reason
irc_server_send_away: don't send empty param if there's no away reason
2014-10-01 21:54:00 +02:00
Michael Vetter
51239925ec source cleanup: remove trailing whitespaces 2014-09-11 19:10:33 +02:00
dequis
d68ee06aa4 irc_server_send_away: don't send empty param if there's no away reason 2014-09-09 21:14:07 -03:00
Sebastian Thorarensen
42a34a78e8 Make line splitting fail-safe
The userhost Irssi uses for line splitting can in some cases be wrong,
for instance when a proxy is used or when a server cloaks the hostname
without telling the client. Now Irssi always assumes the userhost is of
maximum length. 10 for username (common value) and 63 for hostname (in
RFC 2812).
2014-09-01 00:24:17 +02:00
Geert Hauwaerts
f0aa2d2049 Syntax rewrite of U-Z commands
Rewrote the syntax documentation of U-Z commands.
2014-08-05 22:00:30 +02:00
Geert Hauwaerts
4beebe3238 Removed the obsolete SQUERY and SERVLIST commands
Removed the obsolete SQUERY and SERVLIST commands.
2014-07-30 13:02:26 +02:00
Geert Hauwaerts
dde8540e3e Removed the obsolete RPING command
The RPING command is obsolete.
2014-07-14 20:38:01 +02:00
Geert Hauwaerts
938598e271 Removed the obsolete NOTE command
I removed the binding for the NOTE command that doesn't exist anymore on
any major network.
2014-07-09 18:33:10 +02:00
Sebastian Thorarensen
ff08b3b022 Replace a `goto out' with explicit freeing 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
7bfe3a8fa1 Introduce a MAX_USERHOST_LEN constant for IRC 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
29a49c4688 Move the definition of the `split_line' settings 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
bb7bafc93c Split long IRC `ACTION' messages
Add line splitting logic to commands `/me' and `/action'.
2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
90f3dd612e Fix the userhostlen' fallback in split_message'
ferret, the author of `splitlong-safe.pl' pointed out that `userhostlen'
should not only contain the maximum length of the hostname, but also the
maximum length of the username. Now 10 is used as the maximum username
length as a fallback. (`splitlong-safe.pl' uses the same limit.)

The username limit isn't defined in the standard, but 10 is common on
many networks. The odds that something goes wrong here is low, as
 1) the fallback limit is only used when the user has not yet joined a
    channel
 2) the maximum hostname length (63) gives some error margin as the
    hostname usually is shorter
2014-07-06 23:24:09 +02:00
Sebastian Thorarensen
281c6d437d Avoid unnecessary splitting of lines
`split_line_end' could force lines to be unnecessarily split. This
commit fixes the problem by making sure that the last line isn't shorter
than `split_line_end'.
2014-07-06 23:24:09 +02:00
Sebastian Thorarensen
5c05c854dc Add configurable split line prefixes and suffixes
Add settings `split_line_start' and `split_line_end' analogous to
`splitlong_line_start' and `splitlong_line_end' in `splitlong.pl'. The
prefixes and suffixes are concatenated with a wrapper function to keep
`recode_split' and `strsplit_len' simple.
2014-07-06 23:24:09 +02:00
Sebastian Thorarensen
e6147fb8f2 Properly split long IRC messages
This commit adds handling of long IRC messages to the core. In contrast
to the `splitlong.pl' plugin, multi-byte encoded and recoded messages
are properly split.

To allow for this, a new function has been added to the server struct:
`split_message'. `split_message' returns a string array with the message
splitted to substrings of a length that the server can handle. If a
protocol module doesn't have any limit, it can simply return a singleton
array with a copy of the message.

The `MSG' chat command now calls `split_message' before `send_message',
and emits `message own_public' / `message own_private' with each
substring, so that the string splitting will be visible in the UI.

`split_message' in the IRC module uses `recode_split' which in turn uses
iconv to properly split multi-byte encoded (and recoded) messages.
2014-07-06 23:24:09 +02:00
Alexander Færøy
2b6bba3fd2 Merge pull request #62 from dgl/prefix-nick-flags
Use PREFIX from 005 to decide if a nick flag is of op level
2014-06-29 14:32:15 +02:00
David Leadbeater
6accf50991 Use PREFIX from 005 to decide if a nick flag is of op level
Fixes #61.
2014-06-27 14:13:55 +01:00
Dave Reisner
f0925de16b s/INCLUDES/AM_CPPFLAGS/g
Silences warnings on recent automake such as:

src/core/Makefile.am:3: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-27 09:06:21 -04:00
Alexander Færøy
113f1724d7 Merge pull request #44 from dajohi/g_basename
Replace deprecated g_basename with g_path_get_basename.
2014-06-27 14:41:54 +02:00
David Leadbeater
051d1587b0 Add missing include
Silences:
  listen.c:320:3: warning: implicit declaration of function ‘ascii_strup’ [-Wimplicit-function-declaration]
2014-06-26 01:12:33 +01:00
David Leadbeater
b34ded063b Remove unused variables to silence compiler warnings 2014-06-26 00:47:49 +01:00
David Hill
9d6cd87b0f Replace deprecated g_basename with g_path_get_basename. 2014-06-22 20:39:35 -04:00
Alexander Færøy
dcbcb5f04d Merge pull request #50 from dajohi/cmd_null_deref
Avoid potential null dereferences.
2014-06-21 10:53:00 +02:00
David Hill
444f9e4836 Do not break strict-aliasing rules.
dcc-send.c:296:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
2014-06-20 12:43:24 -04:00
David Hill
70a55030d1 Avoid potential null dereferences. 2014-06-20 00:07:47 -04:00
David Leadbeater
908913b5de Revert "add d,q,f and J to CHANMODES default, to work a bit better with dancer and possibly others"
This is no longer relevant and most ircds now send a correct isupport
message.

This reverts commit b832f1f7b2.
2014-06-16 15:35:38 +00:00
David Hill
0d4f13d20f Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04:00
Alexander Færøy
9cc7ea504c Fix warning.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5210 dbcabf3a-b0e7-0310-adc4-f8d773084564
2011-11-21 21:28:28 +00:00
Jilles Tjoelker
cbd163aa5a Accept names replies with nick!user@host instead of nick
if they are somehow enabled (UHNAMES/userhost-in-names).

bug #805


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5205 dbcabf3a-b0e7-0310-adc4-f8d773084564
2011-05-15 21:13:12 +00:00
Jase Thew
444b42bf3e Ensure that expando_cumode_space() doesn't free unallocated memory when no
prefix exists by conditionally allocating and marking to-be-freed the cumode
string inside of expando_cumode(). (Bug #669)


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5203 dbcabf3a-b0e7-0310-adc4-f8d773084564
2011-02-10 06:45:51 +00:00
Wouter Coekaerts
350b346c84 Add prefixes to irc_nicklist_insert() so that nickrec.prefixes is accurate in the
"nicklist new" signal.

Fixes the nicklist sorting on xirssi.

Patch by nenolod.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5184 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-07-24 14:36:55 +00:00
Alexander Færøy
daf6adc0b0 Remove warnings about uninitialized variables.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5140 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-04 12:19:54 +00:00
Alexander Færøy
8728207191 deprecated glib strup/down fixes from exg.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5138 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-03 20:09:37 +00:00
Wouter Coekaerts
4b751d9df6 Use servertag from the active DCC chat when not connected anymore to the IRC server that started it. This fixes a crash with handling the DCC queue. Reported by Aurelien Delaitre (SATE 2009)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5122 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-02-27 18:52:41 +00:00
Jilles Tjoelker
48e87773f0 Accept 354 (WHOX reply) as a /who reply too (for redirection).
Ignore the parameters for matching because 354 does
not have a fixed format.

This helps irssi-proxy with clients that use WHOX,
such as xchat (away checking). WHOX works on ircu
and charybdis 3.1 servers.

Bug #671


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5064 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-05-13 19:27:20 +00:00
Emanuele Giaquinta
4ec53567a5 Remove leftover.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5059 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-04-05 19:04:25 +00:00
Wouter Coekaerts
dde30e63d6 Correct previous commit: fix away checking
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5040 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-03-15 16:25:42 +00:00
Wouter Coekaerts
d81ec45378 Fix /NOTIFY list when nick is seen joining (bug #642)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5039 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-03-10 22:18:01 +00:00
Wouter Coekaerts
e5fee8869c Include hostmask in 001 event sent by proxy (bug #650)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5038 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-03-10 21:36:35 +00:00
Jilles Tjoelker
afdb462c59 Remove unused variables.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5032 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-03-01 00:22:29 +00:00
Jilles Tjoelker
5f05c7ca7a Ensure variable is initialized.
Make sure not to set connection_lost if the server was
already disconnected.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5030 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-28 22:48:41 +00:00