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

4097 Commits

Author SHA1 Message Date
ailin-nemui
29f27cfb39 Merge pull request #658 from LemonBoy/dcc-autoaccept
Quote the filename when dcc requests are auto accepted.
2017-03-04 21:43:21 +01:00
LemonBoy
dc99f8d7a5 Properly check the command arguments in tail place.
A command requiring an argument and given in tail position would not
raise an error but silently set the value to the empty string ''.
2017-03-04 21:37:13 +01:00
Nei
7ef22687f9 Merge branch 'd-minor' into 'master'
Prevent some potential null-pointer deferences.

See merge request !9
2017-03-04 20:35:17 +00:00
Stephen Oberholtzer
5c4e6304ce Don't emit the script destroyed signal before script is actually destroyed
The script unloading code originally worked like this:

1. Destroy package
2. Emit 'script destroyed' signal
3. Unhook script's signal handlers

If a script added a 'script destroyed' signal handler, unloading
that script would cause the 'script destroyed' signal to be sent to the
(already destroyed) package.  This would cause a script error, which would
trigger a script unload, which would start the whole process over again,
until we run out of heap or stack space and segfault.

This commit simply reorders the operations so that the 'script destroyed'
signal is sent *after* the script is fully destroyed.
2017-02-28 23:48:56 -05:00
dequis
7c09b72848 fe-netjoin: remove irc servers on "server disconnected" signal 2017-02-27 23:43:37 -03:00
ailin-nemui
fa1a056291 Merge pull request #647 from dequis/fix-early-ison-take-2
notify-ison: Don't send ison before the connection is done
2017-02-27 14:45:41 +01:00
ailin-nemui
9aaa6449a0 make foreach send commands 2017-02-27 13:43:58 +01:00
LemonBoy
027acffb42 Handle file names with quotes.
Let's repurpose escape_string and make it more flexible by letting us
choose the characters to escape.
2017-02-22 11:49:09 +01:00
LemonBoy
db85ab7c90 Quote the filename when dcc requests are auto accepted.
PR #453 forces the user to quote the filenames given to /DCC commands
when they contain spaces but the autoget functionality didn't get
updated so the filename was always passed without quotes.

Closes #656.
2017-02-21 15:17:37 +01:00
LemonBoy
9cae98e642 Execute what's left in the input queue when the timeout expires.
Similar to how vim behaves.
2017-02-18 15:57:55 +01:00
ailin-nemui
540639e0fa Merge pull request #627 from LemonBoy/ssl-expiry
Check whether the client certificate is expired.
2017-02-15 15:49:00 +01:00
LemonBoy
c067f8e99b Do not alias /server <hostname> to /server connect <hostname>
Closes #559.
2017-02-14 23:02:05 +01:00
LemonBoy
98ead50b4e Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
2017-02-14 14:46:14 +01:00
dequis
15736ba5ab notify-ison: Don't send ison before the connection is done 2017-02-11 00:07:03 -03:00
ailin-nemui
653c7fb05a Merge pull request #622 from ailin-nemui/starttls
provide net_start_ssl api
2017-02-06 12:38:20 +01:00
ailin-nemui
28df637055 provide net_start_ssl api
fixes #615
2017-02-05 23:08:42 +01:00
ailin-nemui
ff5dd3673e Merge pull request #628 from LemonBoy/openssl-compat
Support OpenSSL 1.1.0.
2017-02-05 22:20:31 +01:00
LemonBoy
73e8a065bd Support OpenSSL 1.1.0.
- X509_get_notBefore becomes X509_get0_notBefore
- X509_get_notAfter becomes X509_get0_notAfter
- ASN1_STRING_data becomes ASN1_STRING_get0_data (and drops the const)
- The whole library is now initialized by OPENSSL_init_ssl

Closes #597
2017-02-03 13:29:19 +01:00
Nei
aab24cf4a4 Merge branch 'dub-the-wub' into 'master'
Prevent a memory leak during the processing of the SASL response.

See merge request !8
2017-02-03 11:49:16 +00:00
ailin-nemui
1ee25d2286 Merge pull request #590 from LemonBoy/hi-minor
Minor cleanup in the highlighting signal.
2017-01-31 14:18:48 +01:00
ailin-nemui
4031b92b9b Merge pull request #626 from ailin-nemui/textbuffer_monospace
support storing and replaying the monospace attribute in textbuffer
2017-01-31 14:17:44 +01:00
LemonBoy
19c5178996 Prevent a memory leak during the processing of the SASL response.
We also get rid of an allocation in the process of doing so.
2017-01-24 22:19:50 +01:00
LemonBoy
697dd19d88 Check whether the client certificate is expired.
Right now we only warn the user, the connection keeps going.
Fixes #211
2017-01-22 21:58:55 +01:00
ailin-nemui
876c1dd93e implement break_wide
for more pleasant east asian mixed display
2017-01-20 10:32:23 +01:00
Joseph Bisch
c8dafe2a76
Add SUPPRESS_PRINTF_FALLBACK
There are some cases (such as fuzzing with fe-fuzz) where suppressing
printf output may be desirable.
2017-01-16 12:56:33 -05:00
Hanno
677fb1f55c
perl_parse needs NULL terminated parameter list. 2017-01-15 22:20:23 +01:00
LemonBoy
305b02fc63 Merge pull request #613 from ailin-nemui/fix_completion
fix regression in completion
2017-01-13 22:36:44 +01:00
Alexander Færøy
7732bbed5e Merge pull request #610 from josephbisch/fe-fuzz
Add frontend for fuzzing
2017-01-13 00:16:30 +01:00
Joseph Bisch
fe1ea4b80a
Fix fe-fuzz nits 2017-01-12 18:11:09 -05:00
dx
b15c27cc63 Revert "Don't reset wait_cmd during connection registration (fixes early ISON)" 2017-01-10 03:09:36 -03:00
Joseph Bisch
abdae2d5fc
Don't duplicate module-formats.* in fe-fuzz 2017-01-09 08:19:01 -05:00
ailin-nemui
17fc77565e fix regression in completion
fixes #609
2017-01-09 13:19:37 +01:00
LemonBoy
38ea52d09f Merge pull request #608 from tijko/master
Follow g_strsplit with call to g_strfreev
2017-01-08 21:55:39 +01:00
Joseph Bisch
cf46907256
Add frontend for fuzzing
Use the following configure command:

$ ./configure --with-fuzzer --with-fuzzer-lib=/path/to/libFuzzer.a \
      CC=clang CXX=clang++

Places an irssi-fuzz in src/fe-fuzz/ after build.

Also can specify SANFLAGS to override the chosen sanitizer flags
(defaults to "-g -fsanitize=address -fsanitize-coverage=trace-pc-guard").
2017-01-07 20:01:07 -05:00
Tim Konick
5917bc6f75 Follow g_strsplit with call to g_strfreev 2017-01-07 14:31:35 -08:00
dequis
1831a8e1a7 Don't reset wait_cmd during connection registration (fixes early ISON) 2017-01-06 12:49:56 -03:00
dequis
752f484c6c Add OPENSSL_NO_EC for solaris 11.3, see issue #598
Original patch by 'Slarky'

According to that ticket, the next major version of solaris won't need
this. Consider reverting this when solaris 11.3 stops being relevant.
2017-01-06 11:47:24 -03:00
Martijn Dekker
c9c45e4f89 make irssi --with-perl build with separate object directory
irssi 1.0.0 will not build if Perl is enabled and a separate
object code directory is used. The problem was a relative path
to an internal Perl dependency in four Makefile.PL.in files.
2017-01-06 12:24:36 +01:00
ailin-nemui
33107be748 fix GRegex GError problem 2017-01-05 13:06:55 +01:00
Nei
7a112e0217 Merge branch 'master' into 'security'
Sync to master

See merge request !6
2017-01-03 13:30:39 +01:00
ailin-nemui
01163710e7 Merge pull request #585 from ailin-nemui/win_seq
g_sequence backing for window list
2017-01-03 12:45:50 +01:00
Ailin Nemui
1f72b8e66a up abi version 2017-01-03 12:29:52 +01:00
Ailin Nemui
f5cbbebc2e switch for gregex and regex.h 2017-01-03 12:29:11 +01:00
Nei
1b99299ed2 Merge branch 'percent_flag' into 'security'
fix %[

See merge request !5
2017-01-02 17:01:47 +00:00
Nei
124bcd4804 Merge branch '4-use-after-free-when-receiving-numeric-432-invalid-nick' into 'security'
avoid server_disconnect

See merge request !4
2017-01-02 17:01:29 +00:00
Nei
c3cca5ecf3 Merge branch '1-null-pointer-dereference-in-irc_nickcmp_rfc1459' into 'security'
bail out if nick is NULL

See merge request !3
2017-01-02 17:01:05 +00:00
Nei
24d2d039b5 Merge branch '3-out-of-bounds-read-with-invalid-utf8-in-term_addstr' into 'security'
Fix oob read on invalid utf8 in term_addstr

See merge request !2
2017-01-02 17:00:44 +00:00
Nei
7daa7a6aa9 Merge branch '2-out-of-bounds-read-of-one-byte-with-x1b-48-in-truecolor-builds' into 'security'
check for end of string in ansi 48

See merge request !1
2017-01-02 17:00:15 +00:00
LemonBoy
5dcf291f21 Use the RAW flag when building the regexps.
Also, plugged a memory leak when retrieving the match position.
2017-01-02 17:50:14 +01:00
LemonBoy
5eaead761f Rebase against master. 2017-01-02 17:50:14 +01:00
LemonBoy
3fcd3cd2b9 Remove the regexp_compiled field.
It was made redundant by the introduction of the pointer to the GRegex
structure.
Silence the compiler warning in textbuffer.c about preg being
initialized by setting it to NULL.
2017-01-02 17:50:14 +01:00
LemonBoy
8e5db471e4 Use GLib's regexp interface (backed by PCRE) 2017-01-02 17:50:14 +01:00
ailin-nemui
91f48c6f0e Merge pull request #586 from LemonBoy/fix-580
Process the nick changes in queries before the PRIVMSG is handled.
2017-01-02 14:44:07 +01:00
LemonBoy
7e22d051ae Make sure SASL was actually requested before failing. 2017-01-01 23:08:38 +01:00
ailin-nemui
77ff8f5b74 Merge pull request #514 from LemonBoy/sasl_fail
Add an option to stop the connection when SASL fails.
2016-12-21 15:29:26 +01:00
ailin-nemui
07050e2a3c Merge pull request #587 from ailin-nemui/sbar_crash
add assertion to statusbar_read_group
2016-12-21 15:28:17 +01:00
ailin-nemui
9151f87145 remove some for loops 2016-12-20 21:40:18 +01:00
ailin-nemui
9a018a782c sort windows_seq helpers to top 2016-12-20 21:36:56 +01:00
ailin-nemui
03f5dc63fe nits 2016-12-20 21:33:51 +01:00
ailin-nemui
9004265e54 clean up window_refnum_{prev,next} 2016-12-20 21:01:16 +01:00
ailin-nemui
7dc2f832c1 fix %[ 2016-12-20 16:41:57 +01:00
ailin-nemui
2f59fe2062 add some sequence helper functions 2016-12-19 22:03:46 +01:00
Joseph Bisch
8007e9e61d
Fix oob read on invalid utf8 in term_addstr 2016-12-19 15:52:05 -05:00
ailin-nemui
508d2e0860 bail out if nick is NULL in irc_query_find
Closes #1
2016-12-19 21:41:47 +01:00
ailin-nemui
77aab79057 avoid server_disconnect
Closes #4
2016-12-19 21:16:37 +01:00
LemonBoy
a39e210ea8 Minor cleanup in the highlighting signal. 2016-12-18 15:46:48 +01:00
LemonBoy
7a7f6abc16 Prevent a UaF by calling server_disconnect in a signal handler. 2016-12-15 22:41:57 +01:00
LemonBoy
0d6add02cf Process the nick changes in queries before the PRIVMSG is handled.
Otherwise we end up with the message in the status window since the
frontend knows jack shit about the casemapping option when it tries to
find the associated window for the query.
2016-12-15 19:36:44 +01:00
ailin-nemui
7b856d628b check for end of string in ansi 48 2016-12-15 18:01:26 +01:00
ailin-nemui
17e42649bb reset background for mirc colour 99
fix #571
2016-12-15 17:06:40 +01:00
ailin-nemui
59242cb595 add assertion to statusbar_read_group
fix #564
2016-12-15 16:59:38 +01:00
ailin-nemui
365097319f manually redraw the activity list on expose only
might speed up /foreach query /unquery
2016-12-13 03:19:00 +01:00
ailin-nemui
560283ba4e g_sequence backing for window list 2016-12-13 01:04:26 +01:00
LemonBoy
4ccffd85ff Expose 'sasl_success' to the perl side. 2016-12-12 21:41:07 +01:00
LemonBoy
91c9e871c7 Add an option to stop the connection when SASL fails. 2016-12-12 21:41:06 +01:00
ailin-nemui
618c8bd10e Merge pull request #581 from LemonBoy/set-contract
Enforce the is_node_list contract in lib-config setters.
2016-12-08 12:29:52 +01:00
ailin-nemui
964f423fed Merge pull request #570 from josephbisch/fix-issue-563
enforce check that chatnets are nodelists to handle invalid config
2016-12-08 12:11:59 +01:00
LemonBoy
7fb84b5b7d Enforce the is_node_list contract in lib-config setters.
An assertion failure is better than a segfault.
2016-11-29 23:08:45 +01:00
LemonBoy
5efb3077d5 Merge pull request #565 from ahf/bug/524
Kill bell_beeps.
2016-11-29 22:13:53 +01:00
LemonBoy
22ce6637c7 Merge pull request #577 from LemonBoy/flagz
Minor corrections to the netsplit code.
2016-11-25 21:52:42 +01:00
LemonBoy
5f0e755a00 Don't shadow the 'channel' variable when printing the netjoins.
This is the root cause of #567
2016-11-23 22:22:37 +01:00
ailin-nemui
dcffa98d46 add a static buffer for dcc received data
increased buffersize might make irssi freeze less / #159
2016-11-23 17:02:29 +01:00
LemonBoy
7574bed26c Minor corrections to the netsplit code. 2016-11-23 16:11:38 +01:00
Lauri Tirkkonen
4cbf279d88 add completion_empty_line setting 2016-11-08 16:27:38 +02:00
ailin-nemui
43934ae9ad add missing inheritance to Exec item from 3532fc46 2016-11-01 17:08:28 +01:00
Joseph Bisch
c98f5f23ea
enforce check that chatnets are nodelists to handle invalid config 2016-10-27 11:18:37 -04:00
Alexander Færøy
6a6196eebe
Kill bell_beeps.
Fixes #524
2016-10-23 21:24:12 +02:00
Alexander Færøy
bc4e2c9ade
Shorten the certificate chain output. 2016-10-23 02:51:08 +02:00
Alexander Færøy
322625b548
Only do checks for SSL_get_server_tmp_key in network-openssl.c. 2016-10-22 22:04:33 +02:00
Alexander Færøy
0a6e66f8b7
Kill do { ... } while (0); and replace it with goto's. 2016-10-22 22:04:33 +02:00
Alexander Færøy
d501a54f4f
Emit the TLS handshake finished signal before we do verification.
This patch moves the emitted "tls handshake finished" signal to before
we do validation of the given TLS certificate. This ensures that we
display certificate information before we possibly error out and
disconnects from the server.
2016-10-22 22:04:33 +02:00
Alexander Færøy
5a04430998
Kill support for DANE.
This patch removes support for DANE validation of TLS certificates.

There wasn't enough support in the IRC community to push for this on the
majority of bigger IRC networks. If you believe this should be
reintroduced into irssi, then please come up with an implementation that
does not rely on the libval library. It is causing a lot of troubles for
our downstream maintainers.
2016-10-22 22:04:33 +02:00
Alexander Færøy
f533baa191
Lift EC_KEY declaration onto the entry of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
25824e2d3f
Lift ASN1_STRING declaration onto the entry of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
4e170c5233
Declare variables in the beginning of the function. 2016-10-22 22:04:32 +02:00
Alexander Færøy
53d772e48b
Make sure we clean-up after ourself upon failure. 2016-10-22 22:04:31 +02:00
Alexander Færøy
5146ce9631
Add x509 certificate and public key pinning support.
This patch adds two new options to /CONNECT and /SERVER to let the user
pin either an x509 certificate and/or the public key of a given server.

It is possible to fetch the certificate outside of Irssi itself to
verify the checksum. To fetch the certificate call:

    $ openssl s_client -connect chat.freenode.net:6697 < /dev/null 2>/dev/null | \
      openssl x509 > freenode.cert

This will download chat.freenode.net:6697's TLS certificate and put it into the
file freenode.cert.

-tls_pinned_cert
----------------

This option allows you to specify the SHA-256 hash of the x509
certificate. When succesfully connected to the server, irssi will verify
that the given server certificate matches the pin set by the user.

The SHA-256 hash of a given certificate can be verified outside of irssi
using the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -fingerprint -sha256 -noout

-tls_pinned_pubkey
------------------

This option allows you to specify the SHA-256 hash of the subject public key
information section of the server certificate. This section contains both the
cryptographic parameters for the public key, but also information about the
algorithm used together with the public key parameters.

When succesfully connected to the server, irssi will verify that the
given public key matches the pin set by the user.

The SHA-256 hash of a public key can be verified outside of irssi using
the OpenSSL command line tool:

    $ openssl x509 -in freenode.cert -pubkey -noout | \
      openssl pkey -pubin -outform der | \
      openssl dgst -sha256 -c | \
      tr a-z A-Z

It is possible to specify both -tls_pinned_cert and -tls_pinned_pubkey
together.
2016-10-22 22:01:50 +02:00
Alexander Færøy
c6c2e79537
Display TLS connection information when connected to a TLS enabled server. 2016-10-22 21:58:50 +02:00
Alexander Færøy
1d101afe0d
s/SSL/TLS/ for warning strings. 2016-10-22 21:58:49 +02:00
Alexander Færøy
13f75d49e0
Simplify TLS verification error handling. 2016-10-22 21:58:49 +02:00
Alexander Færøy
b630fd1703
Populate and emit TLS_REC after TLS handshake have completed. 2016-10-22 21:58:49 +02:00
Alexander Færøy
99d017720d
Add TLS_REC.
This patch adds the TLS_REC structure. This structure is used to emit
information about the TLS handshake from the core of irssi to the
front-end layers such that we can display connection information to the
user.
2016-10-22 20:37:33 +02:00
Alexander Færøy
2be7289085
Rename SSL to TLS.
This patch changes the internal name of SSL to TLS. We also add -tls_*
options to /CONNECT and /SERVER, but make sure that the -ssl_* versions
of the commands continue to work like before.
2016-10-22 20:36:50 +02:00
Alexander Færøy
da67d3e8e6
Add function to convert a buffer to a colon-delimited hex string.
This patch adds binary_to_hex(), which can take an input buffer and
convert it to colon-delimited hex strings suitable for printing for
fingerprints.
2016-10-22 20:36:50 +02:00
Alexander Færøy
6300dfec71
Always build irssi with TLS support.
This patch removes the optional checks for whether to build irssi with
TLS support or not. This will allow us to ship a default configuration
file where we connect to TLS enabled IRC servers out of the box.
2016-10-16 14:55:48 +02:00
ailin-nemui
61590f31df Merge pull request #465 from LemonBoy/netsplit-print
Some small adjustments to the netsplit code.
2016-10-11 16:12:35 +02:00
LemonBoy
3667fd9fd1 Make the cap_complete field unsigned.
Fixes a problem where the field would end up as a negative number when
exposed to the perl scripts.
And move it near the other bit-packed fields so we take advantage of the
packing.
2016-09-30 19:30:43 +02:00
ailin-nemui
8d4d313cc9 Merge pull request #506 from kruton/sasl-400-byte-chunk
SASL: handle fragmentation
2016-09-26 16:43:33 +02:00
ailin-nemui
f9fd50a357 nullptr when doing module backward compat on invalid config 2016-09-25 23:17:20 +02:00
ailin-nemui
31044ec004 Merge pull request #542 from LemonBoy/xs-add
Expose the CAP fields to the perl scripts.
2016-09-22 17:10:33 +02:00
ailin-nemui
295a4b77f0 Patches for heap corruption and missing bounds check
By Gabriel Campana and Adrien Guinet from Quarkslab.
2016-09-20 19:56:06 +02:00
ailin-nemui
b3c6cdbb91 Merge pull request #540 from LemonBoy/reset-autorun
/script reset can now also run the autorun scripts
2016-09-19 22:14:57 +02:00
LemonBoy
0e0d99587a Expose 'cap_toggle' to the perl scripts. 2016-09-15 20:38:04 +02:00
ailin-nemui
b58be939d2 Merge pull request #516 from LemonBoy/comp-file
Fix the tab completion for paths starting with ./
2016-09-13 23:29:09 +02:00
LemonBoy
21539019dd Make sure to make a copy of ERRSV content.
Otherwise we might end up showing an empty message.
Fixes #522.
2016-09-13 17:11:05 +02:00
LemonBoy
9591afcb4b Expose the CAP fields to the perl scripts. 2016-09-13 16:07:48 +02:00
LemonBoy
b2424f3193 Add a '-autorun' switch to /script reset
This way we reload all the scripts in the autorun folder.
2016-09-11 16:59:21 +02:00
LemonBoy
e4f8abc973 Merge pull request #533 from dequis/statusmess
Set the default STATUSMSG to @ instead of @+ if it's missing
2016-09-04 12:11:02 +02:00
Kenny Root
60d9ec621f SASL: handle fragmentation
The IRCv3 SASL extension says that AUTHENTICATION payloads of exactly
400 bytes in length indicate that the message is fragmented and will
continue in a subsequent message. Handle the reassembly and splitting of
these messages so that we are compliant with the specification.
2016-08-29 22:56:30 -07:00
ailin-nemui
c8630acbaf Merge pull request #529 from ailin-nemui/issue500
fix nick->host == NULL crash
2016-08-25 04:24:07 +02:00
dequis
3429c1a0a0 Set the default STATUSMSG to @ instead of @+ if it's missing
This fixes two issues:

- IRCNet doesn't have STATUSMSG, but it supports +channels, and
  including + in the default value meant processing those incorrectly

- The "bahamut hack", for old servers that support but don't advertise
  STATUSMSG, didn't work since ischannel_func doesn't use the default.

The choice of @ intentionally leaves out support for other STATUSMSG
(for example, AzzurraNet's bahamut 1.4 fork seemed to support + and % in
any order, contradicting the comment in the code).

I think this is a decent tradeoff, given how those servers are uncommon
and relying on +# or %# is even less common than @#.

Fixes #531
2016-08-24 19:56:23 -03:00
LemonBoy
251d8a686a Fix an OOB access in the cutbuffer implementation. 2016-08-24 22:29:52 +02:00
ailin-nemui
681caf2b58 fix nick->host == NULL crash 2016-08-22 12:27:10 +02:00
ailin-nemui
17f4bd2060 Merge pull request #526 from ailin-nemui/ax-dummy
remove broken dummy mode
2016-08-14 23:35:41 +02:00
ailin-nemui
de11e0f4f2 remove broken dummy mode 2016-08-12 19:33:56 +02:00
ailin-nemui
b411f943a0 fix use after free in expando error 2016-08-12 18:24:58 +02:00
ailin-nemui
9ee4803770 remove curses terminal and ncurses macro 2016-08-04 10:02:28 +02:00
ailin-nemui
8b47196745 Merge pull request #517 from LemonBoy/unignore
Minor cosmetic fix in /unignore error message.
2016-07-13 15:26:37 +02:00
LemonBoy
bd4189907e Minor cosmetic fix in /unignore error message.
Reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577202
2016-07-12 17:38:05 +02:00
LemonBoy
dab3246db9 Fix the tab completion for paths starting with ./ 2016-07-12 16:35:43 +02:00
Tom Feist
9559a8ead9 Allow Irssi::signal_remove to work properly with coderefs 2016-07-12 12:42:15 +02:00
LemonBoy
c0f66c95ff Such draft. Very wow. 2016-06-26 21:45:03 +02:00
LemonBoy
8f5e200551 Avoid entering an endless loop while traversing the channel list 2016-06-26 21:45:03 +02:00
LemonBoy
ed06e43ec8 Some small adjustments to the netsplit code.
By making the signal handler hooked to the "print starting" event
smarter we can avoid dumping the whole netsplit stats for every
server/channel when a message arrives.

Issue #420
2016-06-26 21:45:03 +02:00
ailin-nemui
c2c32e3955 check for NULL in statusbar_more_updated
fixes crash due to invalid access of active_win members when the more
indicator is triggered without an active window
2016-06-25 21:33:50 +02:00
ailin-nemui
f264a78947 Merge pull request #496 from ailin-nemui/comp
completion fixes
2016-06-24 10:05:15 +02:00
LemonBoy
798ce006c2 Merge pull request #498 from vague666/add_modify_functions
Add modify to /channel, /server and /network
2016-06-21 22:46:52 +02:00
Jari Matilainen
a4223a3b2e use TRUE/FALSE in if statements for gboolean 2016-06-21 22:05:21 +02:00
Jari Matilainen
2bb913f0c1 Fix minor nits 2016-06-19 16:35:13 +02:00
Jari Matilainen
4292dbd202 Add command_set_options for modify commands to allow completion 2016-06-18 18:47:11 +02:00
Jari Matilainen
79e30405e6 Let ADD still work as modify 2016-06-18 18:02:04 +02:00
Jari Matilainen
1d2113a638 Add /server modify SYNTAX 2016-06-18 17:53:35 +02:00
Jari Matilainen
421288cf50 Add /network modify 2016-06-18 17:52:47 +02:00
Jari Matilainen
1dd1dde1d4 Add /server modify 2016-06-18 17:52:26 +02:00
Jari Matilainen
92a2384ab0 Add /channel modify 2016-06-18 17:51:58 +02:00
ailin-nemui
77ad62fadb completion fixes 2016-06-16 21:30:46 +02:00
ailin-nemui
fd371cc345 Merge pull request #422 from LemonBoy/misc-cleanup
Clean up misc.c
2016-06-14 12:35:30 +02:00
LemonBoy
2da49e3ca6 Don't crash when the key isn't found. 2016-06-13 22:14:08 +02:00
LemonBoy
862729d7a3 Add a completion_match_case setting. 2016-06-13 22:13:43 +02:00
LemonBoy
78c1c1518a Be smart about case-matching the nicks.
If the prefix contains an uppercase letter then don't use the
case-insensitive search functions.
2016-06-13 21:55:20 +02:00
ailin-nemui
52ced0728b Merge pull request #492 from LemonBoy/enum
Enum setting implementation
2016-06-13 21:47:39 +02:00
LemonBoy
5c8423a08c Add a space after the comma when listing the options. 2016-06-13 20:27:37 +02:00
LemonBoy
439e21f127 Use ; as separator instead of , 2016-06-13 14:07:04 +02:00
LemonBoy
9a30ab53df Move the validation of the CHOICE setting value
Also, use a FORMAT to show the error message.
2016-06-13 14:03:00 +02:00
dequis
9ea155f8df servers-reconnect: pass unix_socket attribute to new connection
Trying to /reconnect unix sockets turned them into inet.
2016-06-12 20:28:06 -03:00
LemonBoy
6f795f020d Strip the surrounding whitespace. 2016-06-12 23:39:22 +02:00
LemonBoy
7307b48bd6 Sort the completion results
Make sure the current option is shown first.
2016-06-12 22:58:35 +02:00
LemonBoy
31f12c10df Use strarray_find instead of g_strv_contains 2016-06-12 16:38:34 +02:00
LemonBoy
86c5e56ef4 Make rejoin_channels_mode of type CHOICE 2016-06-12 16:26:18 +02:00
LemonBoy
bf9d9494db Add a CHOICE type to the settings system.
This is useful to let the user choose an option between a finite set of
valid alternatives.
2016-06-12 16:18:33 +02:00
ailin-nemui
0fad2cd842 Merge pull request #352 from ailin-nemui/silent_perl
silent make perl
2016-06-09 22:02:22 +02:00
ailin-nemui
d6d74c0da9 Do not crash on OPTCHAN when item has no server
May fix bugs.debian.org#826525
2016-06-06 16:58:40 +02:00
LemonBoy
9fd286fed8 Bump the ABI 2016-06-05 22:47:29 +02:00
LemonBoy
98fce5f807 Deprecate net_connect() 2016-06-05 22:47:04 +02:00
LemonBoy
0060f682c2 Factor out some redundant code and remove hashtable_get_keys 2016-06-05 17:24:27 +02:00
LemonBoy
2e8744319d str_to_uofft is a tiny wrapper over strtoul{,l} 2016-06-05 16:54:20 +02:00
LemonBoy
cc70e8c581 Clean up some GTimeVal juggling 2016-06-05 16:48:27 +02:00
LemonBoy
e0b290c34f Update the g_istr_hash function to use the djb hash 2016-06-05 16:24:55 +02:00
LemonBoy
0f9d2b3570 Remove unused regexp_match 2016-06-05 16:24:55 +02:00
LemonBoy
7a3c6fe86c Replace strarray_length with g_strv_length 2016-06-05 16:24:55 +02:00
LemonBoy
72712a0c62 Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was
overflown, but the return value was never checked.
2016-06-05 16:24:55 +02:00
LemonBoy
8289f36075 Check the return value of open() in rawlog.c 2016-06-05 16:24:55 +02:00
LemonBoy
bb190be0bf Replace mkpath with g_mkdir_with_parents 2016-06-05 16:24:55 +02:00
ailin-nemui
e0c8a9f398 perl 5.10 fix 2016-06-05 11:36:13 +02:00
ailin-nemui
03aec7d3b3 silent make perl 2016-06-03 13:55:13 +02:00
LemonBoy
f1d0c8ff99 Correct the name of the emitted signal.
There's a typo in 'sasl_fail', the signal that's emitted should be
'server sasl failure' and not 'server sasl fail'.
2016-06-01 22:29:13 +02:00
ailin-nemui
02221eae37 fix dist compilation failure
remove illegal wcwidth.c include and compile wcwidth.c
correct #include in wcwidth.c
fallout from #480
2016-05-18 16:50:41 +02:00
ailin-nemui
5995c0619d abi increase for #480 2016-05-18 14:39:52 +02:00
ailin-nemui
74d38683bf Merge pull request #480 from xavierog/handle-utf8-nicks-with-mk_wcwidth
Handle utf8 nicks with mk_wcwidth()
2016-05-18 09:18:21 +02:00
Xavier G
5d69b4c4a7 Convert string policies from #define to enum. 2016-05-13 17:35:47 +02:00
Xavier G
a26a387545 Adjust some conditions. 2016-05-13 17:31:11 +02:00
Xavier G
72064de9fe Simplify scrlen_str() using string_width(). 2016-05-13 04:19:38 +02:00
Xavier G
29beafcf6f Improve UTF-8 handling in display_sorted_nicks(). 2016-05-13 04:08:15 +02:00
Xavier G
f1b5b515b9 Make get_alignment() available outside special-vars.c 2016-05-13 03:51:48 +02:00
Xavier G
97a4ee78fd get_alignment: handle UTF-8 strings.
get_alignment now works with columns (width), not bytes, although it is liable
to work with bytes if the given text is not a valid UTF-8 string.
2016-05-13 03:42:56 +02:00
Xavier G
09ca3ad48f Fix indentation of display_sorted_nicks().
This was done assuming an "indent with tab, align with spaces" approach.
get_alignment also benefited from a minor indentation fix.
2016-05-13 03:31:23 +02:00
Xavier G
719efc44a3 Introduce string_chars_for_width(). 2016-05-13 03:04:08 +02:00
Xavier G
35b3ccc6a4 Introduce string_length() and string_width(). 2016-05-13 02:47:26 +02:00
Xavier G
21c07c0060 Leverage string_policy(). 2016-05-13 02:27:19 +02:00
Xavier G
2c8648a9c8 Introduce string_policy(). 2016-05-13 02:10:02 +02:00
Xavier G
b0afcc96db Rename advance() into string_advance(). 2016-05-13 01:52:37 +02:00
Xavier G
5c74a3bb88 Move advance() from fe-common/core to core. 2016-05-13 01:39:14 +02:00
Xavier G
5538578820 Move utf8.{h,c} from fe-common/core to core. 2016-05-13 01:26:33 +02:00
pisculichi
47e792da05 Fix some ANSI C issues. 2016-05-03 15:28:20 +00:00
isundil
b63339af89 Increased ABI version 2016-04-30 18:26:26 +00:00
isundil
e7a18759ec Added case-sensitive regexp matching for hilights 2016-04-29 22:17:51 +00:00
B Thibault
ddd5416430 changed command-line -case to -matchcase 2016-04-29 11:00:34 +02:00
B Thibault
d8a6e66699 Ref #421 (Add an option to make /hilight case sensitive)
Allow use of /hilight -case exAMPle (compatible with other options)
Added matchcase to hilight config file (exemple: { text = exAMPle; matchcase = yes; } )
2016-04-29 01:01:34 +02:00
B Thibault
9fa3869a97 retab 2016-04-29 00:12:28 +02:00
dequis
2ba4b9d26a net_gethosterror: Handle EAI_SYSTEM ("System error") properly
That error code means "check errno". A few users got it and we never
figured out what happened - it usually fixed itself after restarting
something - so hopefully with this we'll have more information the next
time.
2016-04-07 07:26:19 -03:00
ailin-nemui
1349755bb5 Merge pull request #453 from LemonBoy/dcc-quote
Support quoted filenames in some /DCC commands
2016-04-05 22:39:54 +02:00
ailin-nemui
26f875263a Merge pull request #455 from ailin-nemui/cutbuffer
improved cutbuffer handling
2016-03-31 19:13:53 +02:00
ailin-nemui
ec4ecd844b Revert "Removed the obsolete SQUERY and SERVLIST commands"
This reverts commit 4beebe3238.
2016-03-29 22:41:01 +02:00
ailin-nemui
aec2466e36 Improve cutbuffer handling
* Adds two new keys which you can bind in /bind:
  yank_next_cutbuffer: Revert to the previous last deleted text
  append_next_kill: Append next deletion
* Consecutive kills are now appended to the current cutbuffer
2016-03-29 15:20:45 +02:00
ailin-nemui
b9914abbf3 Make use of terminal application keys configurable
adds a new setting term_appkey_mode which can enable or disable the use
of keyboard transmit (application keys) mode. Fixes #430
2016-03-22 23:58:34 +01:00
ailin-nemui
b1ffd5f647 Merge pull request #452 from LemonBoy/terminfo-cup
Don't call terminfo_cont() twice on resume
2016-03-22 23:05:27 +01:00
ailin-nemui
9cb0419435 Merge pull request #443 from LemonBoy/chatnet
Throw an error when a chatnet has no available url
2016-03-22 23:00:01 +01:00
ailin-nemui
29e160f0bf Merge pull request #457 from ailin-nemui/fix_450
fix race condition in terminal init
2016-03-22 22:57:28 +01:00
ailin-nemui
3bc8afa740 Merge pull request #458 from ailin-nemui/fix_449
Properly toggle bracketed paste mode on stop/cont
2016-03-22 22:54:43 +01:00
LemonBoy
897016131e Don't call terminfo_cont() twice on resume
Fixes some weirdness when using ^Z with zsh.
2016-03-22 22:50:24 +01:00
ailin-nemui
d36d34fe04 Merge pull request #456 from ailin-nemui/fix_454
cutbuffer: do not unconditionally use replace when noop was requested
2016-03-22 22:47:42 +01:00
ailin-nemui
35d255fc8c Properly toggle bracketed paste mode on stop/cont
Fixes #449
2016-03-22 16:36:30 +01:00
LemonBoy
8b54366d95 Support quoted filenames in some /DCC commands 2016-03-22 16:00:00 +01:00
LemonBoy
e5ee243ab6 Simplify some logic in server_create_conn 2016-03-22 15:45:08 +01:00
ailin-nemui
195c44a76e Merge pull request #446 from ailin-nemui/fix_445
strip less whitespace from commands
2016-03-22 15:23:37 +01:00
ailin-nemui
938d0071c6 fix race condition in terminal init
remove the tcgetattr call to a single time on irssi load instead of
querying it each time. Fixes #450
2016-03-22 15:21:20 +01:00
ailin-nemui
117c890d98 cutbuffer: do not unconditionally use replace when noop was requested 2016-03-22 14:43:31 +01:00
ailin-nemui
f7658640fb Merge pull request #437 from vague666/glob_matching
Use glob matching for activity_hide_targets
2016-03-21 11:21:01 +01:00
ailin-nemui
132d3c49f3 strip less whitespace from commands
fixes #445
2016-03-20 22:39:06 +01:00
ailin-nemui
2ab2636713 Merge pull request #442 from LemonBoy/fix-435
Do not assume any default value for statusmsg.
2016-03-20 22:06:41 +01:00
LemonBoy
550fe6f010 Use 0 as a sentinel value for sasl_timeout
If sasl_timeout is never initialized with a valid timeout id then
calling /disconnect on the server calls g_source_remove() with 0 as tag,
causing an harmless error message to be printed.
Beside that, the sasl_timeout field is defined as a unsigned int.
We can use 0 as sentiel since g_timeout_add returns tags that are always
greater than zero.
2016-03-20 21:47:02 +01:00
LemonBoy
8394973d5a Bump the ABI version
Since a new format has been added.
2016-03-20 12:16:48 +01:00
LemonBoy
6745dd6159 Throw an error when a chatnet has no available url
If you type /connect <CN> and the chatnet <CN> has no url available
let's just throw an error instead of trying to process <CN> as a url.
2016-03-19 14:04:53 +01:00
LemonBoy
f31d37a852 Make ischannel_func return false for empty strings 2016-03-19 12:11:53 +01:00
Jari Matilainen
857e27aef6 Don't use glob matching, just regular string comparisons 2016-03-17 23:58:46 +01:00
LemonBoy
f6c2805b91 Do not assume any default value for statusmsg.
If the server didn't send it then just skip the check, the old value it
defaulted to was possibly overlapping with the CHANTYPES leading to an
incorrect behaviour. Fixes #435.
2016-03-17 22:27:05 +01:00
TheLemonMan
795b7de808 Merge pull request #439 from horgh/ssl-errors
Clear error queue before SSL I/O operations
2016-03-17 22:07:57 +01:00
ailin-nemui
49bdd179b2 Merge pull request #438 from dequis/sasl-timeout-disconnect
Remove sasl timeout source when the server disconnects
2016-03-17 16:14:34 +01:00
KindOne
bcebed5a72 Replace spaces with tabs 2016-03-14 21:23:37 -04:00
Jari Matilainen
94b823c3cd Use glob matching for activity_hide_targets
spaces vs tabs!

strarray_find* needs to return -1 if no index found
2016-03-14 22:29:36 +01:00
Jari Matilainen
27c37cb3f3 Return -1 from null-test to comply with the rest of strarray_find 2016-03-14 22:17:17 +01:00
Will Storey
8ab6bdf2ce Add clear error calls to irssi_ssl_get_iochannel 2016-03-13 15:09:52 -07:00
Will Storey
be733d2482 Clear error queue before SSL I/O operations
Otherwise we can see errors that are not related to the operation
we check for. SSL_get_error() inspects the thread's error queue.
See https://www.openssl.org/docs/manmaster/ssl/SSL_get_error.html for
more information.
2016-03-13 13:28:04 -07:00
dequis
e853392f43 Remove sasl timeout source when the server disconnects 2016-03-11 14:55:31 -03:00
Giuseppe
66e9c4bb39 Merge pull request #432 from grawity/fix-external
fix SASL EXTERNAL
2016-03-08 22:49:05 +01:00
ailin-nemui
8f1f1d879f Merge pull request #426 from Manishearth/paste-split
Make pasting warning appear when long pastes are going to be split into many lines
2016-03-08 22:17:06 +01:00
Mantas Mikulėnas
4baefd2574 Fix SASL EXTERNAL authentication
The "AUTHENTICATE" command is always required – it's part of the IRCv3
SASL framing. RFC 4422 only documents the Base64 payload.
2016-03-08 23:13:03 +02:00
Lukas Mai
8c1da2890c irssi proxy: allow listening on unix sockets 2016-03-02 00:53:56 +01:00
Lukas Mai
3fc7e4d4ea reindent 2016-03-02 00:51:01 +01:00
Lukas Mai
4d234c175c fix proxy server name 2016-02-26 18:40:51 +01:00
Manish Goregaokar
ef0c7d3e7a Make pasting warning appear when long pastes are going to be split into many lines 2016-02-24 00:51:11 +05:30
Manish Goregaokar
9f0e5da208 use a #define'd LINE_SPLIT_LIMIT instead of hardcoding 400 2016-02-24 00:42:35 +05:30
Lukas Mai
3167ccfbc2 remove redundant check 2016-02-18 02:23:09 +01:00
Lukas Mai
c9ce0c521a make pointer check explicit 2016-02-18 02:23:00 +01:00
Lukas Mai
4732e33ca9 irssi proxy: allow multiplexing multiple networks over a single port 2016-02-18 01:20:33 +01:00
Lukas Mai
88e2449f83 fix formatting 2016-02-18 01:20:33 +01:00
Todd A. Pratt
8723c0fb33 fix whitespace 2016-02-10 09:47:10 -05:00
Todd A. Pratt
0ca534c345 Merge branch 'master' of github.com:irssi/irssi 2016-02-10 09:42:42 -05:00
ailin-nemui
0860469900 Merge pull request #413 from dequis/completion-list-crash-fix
completion: Fix crash when the complist provided by a script has nulls
2016-02-05 21:39:20 +01:00
Todd A. Pratt
431863852c Merge branch 'master' of github.com:irssi/irssi 2016-02-04 21:48:41 -05:00