1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00
Commit Graph

1144 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
8c04c2be14 Fix build without Capsicum.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
12e2c46d6a Add wrappers to reduce #ifdefs.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
c00d4753ae Restrict port range available in capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
e777ae986d Working autolog.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
241dd66ac1 Working /log and /rawlog.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
939371aa1d Fix warnings.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
1f57ceec4c Prevent the user from calling "/capsicum enter" twice.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
509eca76f0 Make DNS work in capability mode.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
f4546be7ec Reorder functions.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
925240155e Config file support for "capsicum" parameter.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
cec68557aa /connect works - although only with IP addresses. 2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
3200c381db Rename to "/capability enter" and "/capability status".
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
d5d45c29b8 Add capability mode error/success messages.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
56c94570b4 Implement /cap_enter.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 23:52:23 +01:00
Edward Tomasz Napierala
2914498b29 Consistency: use FALSE instead of 0.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 10:42:53 +01:00
Edward Tomasz Napierala
08dc6734b9 When rawlog open fails, there's no point in trying to write. Don't.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-29 10:40:42 +01:00
Edward Tomasz Napierala
42b5e89f6e Add missing diagnostics for rawlog open().
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-28 04:49:14 +01:00
Edward Tomasz Napierala
e08e2bd87a Don't compute log_dir_create_mode in three different places.
Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
2017-07-28 03:56:02 +01:00
Nei
f67e766934 Merge branch 'fix-11' into 'security'
Correct GHashTable usage

See merge request !16
2017-07-05 14:46:42 +00:00
Nei
fc3615120d Merge branch 'fix-10' into 'security'
Check return value of localtime

See merge request !15
2017-07-05 14:46:24 +00:00
ailin-nemui
73b851c39c correct GHashTable usage 2017-07-04 16:11:45 +02:00
ailin-nemui
1656dc1e54 Merge pull request #653 from ailin-nemui/regexex
Enable UTF8 in GRegex
2017-07-03 09:53:09 +02:00
Nei
29ebac987d Check return value of localtime
Fixes #10
2017-06-29 13:48:44 +00:00
dequis
7354a74c65 parse_time_interval: Allow negative time in settings
This splits sign parsing out of parse_time_interval_uint() so that the
negative sign is applied outside of the unsigned context where the
number parsing is done, and after all the checks that it's lower than
(1 << 31)

This fixes issues with settings like `server_reconnect_time`,
`server_connect_timeout` and `lag_max_before_disconnect`, which accepted
-1 as a valid value.
2017-06-17 15:34:36 -03:00
ailin-nemui
4edfccfce7 get rid of new_text 2017-06-05 13:46:43 +02:00
ailin-nemui
48899a123d Update iregex-gregex.c
add 2 comments about new_string
2017-06-05 10:23:16 +02:00
ailin-nemui
00354c3651 Update iregex-gregex.c
make helper functions static
2017-06-05 10:10:38 +02:00
ailin-nemui
79bbca4644 Refactor regex and implement UTF8 mode for GRegex
- with non-unicode byte to Private Use Area A mapping
- move all ifdefs to iregex.h file only
2017-06-04 00:52:53 +02:00
dequis
632b0ce5e6 Add parse_uint function to improve integer overflow handling
Originally found by oss-fuzz (issue 525) in get_ansi_color using ubsan.
After a lot of analysis I'm 99% sure this isn't security relevant so
it's fine to handle this publicly.

The fix is mainly adding a function that does it right and use it
everywhere. This is harder than it seems because the strtol() family of
functions doesn't have the friendliest of interfaces.

Aside from get_ansi_color(), there were other pieces of code that used
the same (out*10+(*in-'0')) pattern, like the parse_size() and
parse_time_interval() functions, which are mostly used for settings.
Those are interesting cases, since they multiply the parsed number
(resulting in more overflows) and they write to a signed integer
parameter (which can accidentally make the uints negative without UB)

Thanks to Pascal Cuoq for enlightening me about the undefined behavior
of parse_size (and, in particular, the implementation-defined behavior
of one of the WIP versions of this commit, where something like signed
integer overflow happened, but it was legal). Also for writing
tis-interpreter, which is better than ubsan to verify these things.
2017-05-18 00:21:11 -03:00
ailin-nemui
371eb7f505 expand macro 2017-05-12 16:27:33 +02:00
ailin-nemui
787e192567 improve nicklist performance 2017-05-12 13:36:48 +02:00
Joseph Bisch
a4cc4e0ad7
Fix off by one error with char_expandos 2017-03-31 15:37:48 -04:00
dequis
93c158d815 expand_escape: expand double backslash as a backslash 2017-03-08 20:01:05 -03:00
ailin-nemui
ddba68ad77 Merge pull request #659 from ailin-nemui/foreach_dontspam
make foreach send commands
2017-03-07 23:37:23 +01:00
ailin-nemui
62fd3ac180 Revert "Quote the filename when dcc requests are auto accepted." 2017-03-06 11:27:55 +01:00
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
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
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
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
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
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
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
ailin-nemui
33107be748 fix GRegex GError problem 2017-01-05 13:06:55 +01:00
Ailin Nemui
f5cbbebc2e switch for gregex and regex.h 2017-01-03 12:29:11 +01: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
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
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
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
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
f9fd50a357 nullptr when doing module backward compat on invalid config 2016-09-25 23:17:20 +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
ailin-nemui
52ced0728b Merge pull request #492 from LemonBoy/enum
Enum setting implementation
2016-06-13 21:47:39 +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
31f12c10df Use strarray_find instead of g_strv_contains 2016-06-12 16:38:34 +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
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
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
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
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
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
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
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
LemonBoy
e5ee243ab6 Simplify some logic in server_create_conn 2016-03-22 15:45:08 +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
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
KindOne
bcebed5a72 Replace spaces with tabs 2016-03-14 21:23:37 -04: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
ailin-nemui
af229a8bb7 Merge pull request #410 from LemonBoy/getaddrinfo-v6-flag
Getaddrinfo v6 flag
2016-02-03 11:45:11 +01:00
LemonBoy
0cc8276e89 Add AI_ADDRCONFIG to the getaddrinfo hints.
A first step to untangle the ipv4 vs ipv6 mess.
At the time of writing Linux, OpenBSD and FreeBSD all support the
AI_ADDRCONFIG flag.
2016-01-27 16:16:27 +01:00
LemonBoy
118eb0a68c Call getnameinfo with NI_NAMEREQD flag.
This way net_gethostbyaddr will fail when the system is unable to
resolve the address to a valid host name.
Without this flag in case of failure the function would return the ip
address instead of failing.
2016-01-27 15:54:29 +01:00
LemonBoy
f31b2026b4 Minor style fix in net_ip2host. 2016-01-27 15:04:07 +01:00
LemonBoy
87c0827471 Delete the HAVE_IPV6 ifdef.
Welcome to the future.
2016-01-27 14:31:55 +01:00
LemonBoy
eba160ca6d Duplicate the code paths for autocommands. 2016-01-24 23:02:40 +01:00
LemonBoy
2502080871 Change when the autocmds are sent.
As per #175 if a -botcmd is specified for a given channel without a
-bots parameter then the command is sent right after joining the
channel.
2016-01-14 23:54:42 +01:00
ailin-nemui
62cab9d662 Merge pull request #393 from ailin-nemui/moduleversion-perl
forward ABI to perl modules
2016-01-11 21:19:35 +01:00
LemonBoy
dbee606c60 Don't break the API.
Have a ignore_find_full method that is the one that all the new code
should be using and provide some working stubs for ignore_find and
ignore_find_noact.
2016-01-03 21:26:57 +01:00
LemonBoy
609f3ba6c2 Clean up the ignore_find API to make it more powerful.
This way we prevent the creation of duplicate ignores since the old code
skipped the ignore_find call when a pattern was specified.
It should also cover all the cases where the ignores would be wrongly
overwritten, such as the case outlined in #78.
2016-01-03 19:49:18 +01:00
ailin-nemui
ff8ccaf08b module check irssi version
Add explicit checks into every module to match the ABI version defined
in common.h
2015-12-10 00:52:33 +01:00
ailin-nemui
4dc2bab4b4 Merge pull request #371 from LemonBoy/rampage
Rewrite some faulty logic handling the saved channels. Fixes #340
2015-12-09 23:07:48 +01:00
dequis
96766b7f05 Remove all WIN32 ifdefs (unifdef -UWIN32)
Just use cygwin.

This looks like it wasn't enough to do anything useful, and I don't
think anyone cares about supporting win32 the hard way.
2015-12-09 15:20:59 -03:00
LemonBoy
1749a7a5ab Minor adjustments.
Use g_strcmp0 instead of strcmp.
Explicit checks added for the g_strcmp0 clauses.
2015-12-09 16:16:03 +01:00
LemonBoy
971417caa3 Rewrite some faulty logic handling the saved servers. 2015-12-09 16:02:37 +01:00
LemonBoy
60c501625b Better function naming 2015-12-09 15:43:31 +01:00
LemonBoy
750df38e8c Rewrite some faulty logic handling the saved channels.
Issue #340 brought to our attention the fact that under certain
circumstances irssi would go on a wild rampage and carelessly overwrite
some saved channel records in the configuration file.
This happened because the code didn't take into account the case where
the channel index in setupchannels wouldn't match the one in the
configuration; this actually happens when the user removes a chatnet
without removing the associated channels.
2015-12-09 00:34:39 +01:00
LemonBoy
8701cbc972 Let ignore_check do its work when server is NULL
A NULL-check has been added to the ignore_match_server macro, making the
function safe from a pointer perspective.
Fixes #193 in the meanwhile.
2015-11-22 17:20:00 +01:00
LemonBoy
3d9b9d473f Strip the trailing whitespace from /join commands.
Fixes #99 for great good.
2015-11-09 18:42:49 +01:00
LemonBoy
1006fee802 Add an option to strip trailing whitespace when parsing commands 2015-11-09 17:32:51 +01:00
ailin-nemui
6d6e672e8e Merge pull request #313 from isundil/master
Fix #45 Make it easy to delete default channels, servers and networks
2015-11-09 16:45:19 +01:00
ailin-nemui
0188c1fb5d Merge pull request #341 from dequis/strsplit-len-fix
Fix invalid reads in strsplit_len when splitting on spaces
2015-11-09 16:21:33 +01:00
dequis
b054ade4b9 strsplit_len: make it look more like the original version 2015-11-09 06:46:40 -03:00
dequis
8736c12fc9 strsplit_len: use strlen() directly instead of a remaining_len variable 2015-11-09 06:33:08 -03:00
dx
8d1f667100 Merge pull request #320 from irssi/ahf/add-setting-type-any
Fix warnings
2015-11-01 13:40:54 -03:00
dequis
ed28483e75 Fix invalid reads in strsplit_len when splitting on spaces
The symptom for this one is randomly getting lines split before the last
word, even if there's no need for splitting. Also, this function is only
reached if recode is on, and iconv failed (for example, due to an
incorrect source charset). Thanks to vague for finding this and
providing valgrind logs.

The loop that looks for spaces tried to read backwards from the end of
the current line, with the end being determined by len. Assuming
strsplit_len() with len=400, this meant accessing str[399] in the first
iteration. For strings that don't need splitting, this means an invalid
read always.

If that invalid read happens to hit garbage that has a space character,
(len - offset) points after the end of string, which isn't a problem for
g_strndup() since it stops at the first null, and no splitting happens.
If the garbage doesn't have any spaces, it splits by the last word.

This commit avoids that loop entirely if (remaining_len > len). It also
changes the way it iterates over the string to be much less confusing.
2015-10-23 05:12:04 -03:00
dequis
f540ec9de1 Fix /reconnect RECON-1 saying "Reconnection tag 1 not found"
Turns out it was fixing the wrong string, and trying to do
atoi("RECON-1") instead of atoi("1").

"/reconnect 1" worked, but "/reconnect RECON-1" gave that confusing
error message.
2015-10-08 00:06:17 -03:00
Alexander Færøy
685d8fe5b0
Add SETTING_TYPE_ANY and replace -1 with it. 2015-10-03 19:01:16 +02:00
LemonBoy
b68a30cdfe Include write-buffer.h in log-away.c
Silence a warning and make the world a better place.
2015-10-03 14:32:38 +02:00
dequis
ef55e0f653 Add missing null terminator to the g_build_path() varargs
Lemon broke it a few commits ago.
2015-10-02 13:48:23 -03:00
Geert Hauwaerts
9c5f6780b2 Merge pull request #316 from LemonBoy/fix_mem_leak
Fix a memory leak.
2015-10-02 09:39:10 -07:00
LemonBoy
db5ae4adce Flush the dirty buffer to disk
Given a big enough write_buffer_size and a long enough
write_buffer_timeout it might be possible to show the user an incomplete
or empty awaylog.

Patch by: Petteri Aimonen
2015-10-02 17:21:17 +02:00
LemonBoy
b545bc96a9 Fix a memory leak.
g_get_current_dir() returns a heap-allocated string.
2015-10-02 12:39:08 +02:00
isundil
ef1a09b87d Fix return value of server_setup_remove_chatnet 2015-10-01 22:53:34 +02:00
isundil
6ca7dc6847 Updated server removal
Removing network will also remove attached channels
2015-10-01 22:36:02 +02:00
isundil
2ad6bb1295 Fix #45 Make it easy to delete default channels, servers and networks
Removing network will now also remove all attached servers
2015-10-01 21:14:30 +02:00
Jari Matilainen
a2277e84bd Added functionality to create dir if dir specified in rawlog filename 2015-09-24 11:59:18 +02:00
ailin-nemui
618a636f7c Merge pull request #297 from vague666/hilight_nick_matches
Add new setting to modify behaviour of hilight_nick_matches to match anywhere in message

Fixes #56
2015-09-23 00:07:03 +02:00
Jari Matilainen
3f2eaf1d3a Fix return value from nick_match_msg_everywhere, remove #include 'settings.h' 2015-09-22 23:16:41 +02:00
Jari Matilainen
b5c3e90802 Fix return value from nick_match_msg_everywhere 2015-09-22 23:09:55 +02:00
Jari Matilainen
5a4be0f4f5 Add new setting to optionally modify behaviour of hilight_nick_matches
Fix indentation

Remove unused variables that crept into the nick_match_msg_everywhere function
2015-09-22 22:49:50 +02:00
ailin-nemui
f5f3d7cc98 Revert "Network and IPv{4,6} related changes" 2015-09-22 21:59:17 +02:00
LemonBoy
564829610d Ding dong the switch is dead 2015-09-21 14:55:35 +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
LemonBoy
06040fb30b Merge remote-tracking branch 'origin' into sasl 2015-09-19 23:58:16 +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
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
Alexander Færøy
03be2861dc Merge pull request #235 from dequis/g_strcmp0
Change all strcmp() to g_strcmp0() to handle nulls gracefully
2015-04-17 21:13:18 +02:00
Haw Loeung
349ed35ce0 ssl: Fixed call to SSL_CTX_set_cipher_list() only when ssl_ciphers specified and warn when no cipher suite could be selected. 2015-04-15 00:44:07 +10:00
Haw Loeung
50e955e342 ssl: Add option to specify SSL cipher suite preference. 2015-04-14 18:07:35 +10: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
Adam
28aaa653cf Add SNI support 2015-04-07 15:01:57 -04: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
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
Alexander Færøy
89cdcecf76 Merge pull request #133 from pjcj/master
Speed up /reload when there are many ignores.
2014-12-16 20:39:33 +01:00
Geert Hauwaerts
08b390b11b Documentation fix for #185
Documentation fix for #185
2014-12-08 21:28:02 +01:00
Alexander Færøy
bbd7333924 Merge pull request #171 from vlajos/typofixes-vlajos-20141108
typo fixes - https://github.com/vlajos/misspell_fixer
2014-12-06 16:09:11 +01:00
Guillaume BROGI
86d263dd7d Check for unix sockets when reconnecting 2014-12-03 14:38:01 +01:00
Guillaume BROGI
f0a6e5f82a Correctly parse unix sockets servers in the config 2014-11-20 17:01:07 +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
8bd575df2e Disable SSLv3 2014-10-15 10:00:30 +02:00
Alexander Færøy
10078407f6 Remove unnecessary NULL check
Fixes: #135
2014-10-11 12:13:22 +02:00
Alexander Færøy
d9ea224628 Fix use-after-free bug with cached settings values
This patch fixes a couple of use-after-free bugs when caching various
string related setting values.

Fixes: #143
2014-09-30 18:07:13 +02:00
Paul Johnson
d9deafe57c Speed up /reload when there are many ignores.
With many ignores (a few thousand) /reload could take so long that connections
were dropped.  The problem is that nickmatch_rebuild() was being called for
every ignore.  The easy solution is to only call it once at the end.
2014-08-23 21:08:17 +02:00
David Leadbeater
1dbc3dba78 Fix rawlog saving after dac67a5 broke it 2014-08-05 17:33:50 +01:00
David Hill
6e45d68399 Avoid using uninitalized values. 2014-07-12 16:35:42 -04:00
Alexander Færøy
b2c3db4d5b Fix Clang warnings
This patch fixes a few warnings emitted by clang by removing the
initialization of the list by itself.
2014-07-07 22:26:04 +02:00
Sebastian Thorarensen
1c73bde239 Fix minor coding style issues in message splitting 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
695a6a7d9b Allow `server.split_message' being NULL
Now a module can set `server.split_message = NULL' to disable message
splitting, instead of having to implement the function.
2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
28a3dbe164 Replace an indent of eight spaces with a tab 2014-07-06 23:24:10 +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
David Leadbeater
dac67a567d Check return values from some syscalls and warn if they fail 2014-07-06 21:52:03 +01:00
David Leadbeater
7949e4c53f Initialize in6 correctly
This is technically wrong as it then gets used as an IPv4 sockaddr, but it only
needs to be some 0s so this is easier than changing the IPADDR data structure or
adding a new API.
2014-07-06 19:56:13 +01:00
David Leadbeater
beec29c305 Make configure checks able to build with -Werror
Also fix a few compiler warnings, this combined with pull #82 allows me to build
with CFLAGS="-Werror -Wall".
2014-07-06 18:56:17 +01:00
Alexander Færøy
ed51629514 Merge pull request #80 from dgl/noact
Change NO_ACT so it can be combined with other levels
2014-07-04 23:48:41 +02:00
David Leadbeater
a9d9756d4d Make /ignore -replies work with NO_ACT 2014-06-30 09:35:31 +01:00
David Leadbeater
d84811b192 Don't expand ALL when combined with NEVER/NO_ACT 2014-06-30 00:31:59 +01:00
David Leadbeater
819f9d16c9 Change NO_ACT so it can be used in addition to other ignores
This results in a more flexible system and is less surprising as it means levels
can be used in the way they normally can in an ignore.

As an example the current approach to NO_ACT provides no way to let HILIGHTS
be shown, with this change /set activity_hide_targets can be recreated with:
  /ignore #channel NO_ACT
  /ignore #channel -except -regexp -pattern . NO_ACT HILIGHTS
(but obviously this can be configured in many more ways if desired).
2014-06-30 00:31:53 +01:00
David Leadbeater
0086211236 Warn with error if regexp ignore fails to parse 2014-06-30 00:23:42 +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
David Leadbeater
86fcadb85d Add some missing casts to silence compiler warnings 2014-06-26 00:44:07 +01:00
David Hill
5419a4b360 Fix compiler warning.
network.c:63:2: warning: missing braces around initializer [-Wmissing-braces]
network.c:63:2: warning: (near initialization for 'ip4_any.ip.__u6_addr') [-Wmissing-braces]
2014-06-20 00:41:52 -04:00
Tom Feist
7d87a02522 Add NO_ACT level
This patch adds a new NO_ACT level that can be used with /ignore to
ignore activity notifications
2014-06-18 23:40:26 +02:00
Ailin Nemui
a8c52d8c16 speed up nicklist by using hash 2014-06-15 23:38:05 +02:00
Ailin Nemui
a4c62a3fee speed up window_item_find by interning name and removing call to channel_find 2014-06-15 23:37:13 +02:00
Alexander Færøy
53f50d3dfa Merge pull request #33 from dajohi/modules_load
Silence a compiler warning.
2014-06-15 21:57:42 +02:00
David Hill
5b2d189ab5 Silence a compiler warning.
If the first g_module_symbol call failed, module_deinit was set
to value2, which is uninitialized.  Move the assignment after
checking variable found to silence the warning.
2014-06-15 15:40:08 -04:00
David Hill
138d4f4555 Replace deprecated g_io_channel_close with g_io_channel_shutdown.
g_io_channel_close flushes the buffer and does not return errors.
g_io_channel_shutdown(handle, TRUE, NULL) keeps that behavior.
2014-06-15 15:23:29 -04: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
68f8229373 Add -ssl_pass to /connect and /server
Fixes: Bug #305

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5231 dbcabf3a-b0e7-0310-adc4-f8d773084564
2014-01-11 19:53:17 +00:00
Geert Hauwaerts
03359ba0fe - Applied a patch from Jaroslav Škarvada (FTBFS if "-Werror=format-security" flag is used | https://bugzilla.redhat.com/show_bug.cgi?id=1037139)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5229 dbcabf3a-b0e7-0310-adc4-f8d773084564
2014-01-10 20:29:42 +00:00
Alexander Færøy
eb8dfc8cc9 Clean-up after ourselves
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5223 dbcabf3a-b0e7-0310-adc4-f8d773084564
2013-06-25 21:35:13 +00:00
Alexander Færøy
4d36a9e498 Add TLSA related signals
This patch adds 3 new signals:

  * tlsa avalable: emitted if TLSA is available for a given domain.
  * tlsa verification success: emitted if the TLSA check was successful.
  * tlsa verification failed: emitted if the TLSA check was unsuccessful.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5220 dbcabf3a-b0e7-0310-adc4-f8d773084564
2013-06-23 23:50:32 +00:00
Alexander Færøy
cb873d5b91 Pass SERVER_REC directly to net_connect_ip_ssl
This patch refactors how we are passing connection information for SSL
connections. This will allow us to emit signals with a SERVER_REC as
parameter during SSL handshake.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5219 dbcabf3a-b0e7-0310-adc4-f8d773084564
2013-06-23 23:50:26 +00:00
Alexander Færøy
d826896f74 Implement experimental DNSSEC DANE support
This patch adds experimental support for the DNSSEC DANE verification
protocol using the libval library from the DNSSEC-Tools package.

Thanks to Thomas Steen Ramussen for creating a test setup and suggesting
the idea of experimenting with DANE support in Irssi :-)

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5218 dbcabf3a-b0e7-0310-adc4-f8d773084564
2013-06-23 23:50:14 +00:00
Emanuele Giaquinta
7ae4919229 Do not set SSL_OP_ALL, it is not needed to disable SSLv2 and it can prevent
connections to TLSv1.1 servers from working. Patch by pi-rho.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5216 dbcabf3a-b0e7-0310-adc4-f8d773084564
2012-06-24 09:50:08 +00:00
Alexander Færøy
796134ffbd Add -noautosendcmd to /SERVER and /CONNECT.
Passing this option will force Irssi to not execute the content of the
autosendcmd chatnet-setting upon connect.

Fixes: #738


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5209 dbcabf3a-b0e7-0310-adc4-f8d773084564
2011-11-21 21:27:58 +00:00
Jilles Tjoelker
81b8dcdeb2 Do not go beyond the end of the string when processing an octal escape.
This code is used, for example, when /set expand_escapes on.

I can't reproduce crashes but I can reproduce garbage if I type a\1.

bug #775


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5195 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-11-17 20:41:14 +00:00
Alexander Færøy
4976f75295 Fix indention.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5186 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-07-28 16:15:02 +00:00
Jase Thew
ec83dd762a Fix segfault generated by SSL disconnections. (Bug #752)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5170 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-05-16 17:50:31 +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
Alexander Færøy
df1d7a7814 glib iochannel fixes from exg.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5137 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-03 20:04:15 +00:00
Alexander Færøy
dd23f39f09 Do not use SSLv2 protocol. From Bazerka.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5136 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-04-03 19:09:11 +00:00
Wouter Coekaerts
1aa10ece88 Fix crash when checking for fuzzy nick match when not on the channel. Reported by Aurelien Delaitre (SATE 2009)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5126 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-03-21 20:23:34 +00:00
Alexander Færøy
e37be456cd Allow servers with the same server and port to be part of multiple networks. This should make life much easier for znc users. Thanks to Tykling, Bazerka and znx.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5125 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-03-21 20:06:10 +00:00
Wouter Coekaerts
dae9a76312 Fix compiling without ssl
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5117 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-02-22 19:37:18 +00:00
Jilles Tjoelker
f32b3938b0 network-openssl: Show why a certificate failed validation.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5116 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-02-19 17:29:10 +00:00
Jilles Tjoelker
efd60c2c51 Call OpenSSL_add_all_algorithms(), may be needed to verify SHA256 certs with certain versions of OpenSSL.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5108 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-01-31 00:15:25 +00:00
Jilles Tjoelker
532e3f5d19 Use one SSL_CTX per connection, use default trusted CAs if nothing specified.
This allows useful use of -ssl_verify without
-ssl_cafile/-ssl_capath, using OpenSSL's default trusted CAs.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5107 dbcabf3a-b0e7-0310-adc4-f8d773084564
2010-01-31 00:13:05 +00:00
Wouter Coekaerts
bb4ce4562b Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-12-28 12:15:18 +00:00
Jilles Tjoelker
cb68d5f4e6 Tell OpenSSL that our write buffer may move (although the content remains the same).
This fixes disconnects when sending large amounts of data
to the server.
Note that it assumes that write retries will retry the same
data; a reasonable assumption, but it is not necessary for
any normal write().


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5095 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-09-02 20:55:13 +00:00
Jilles Tjoelker
c4bd1631bb Make the time duration parser stricter.
This makes  /set server_reconnect_time = 10min  fail
instead of setting the time to 0.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5057 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-04-03 22:09:17 +00:00
Jilles Tjoelker
0764675409 Remove unused variable.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5031 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-28 23:09:33 +00:00
Emanuele Giaquinta
1d9db4db9a Remove unused variable.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5028 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-28 21:41:47 +00:00
Jilles Tjoelker
4f3b7696a0 Correct assertions.
Found using llvm static analyzer.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5027 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-28 20:51:22 +00:00
Jilles Tjoelker
25b3a531be Once a second seems sufficient for the expando timer.
These seem to change once a second at most, typically.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5025 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-28 18:02:48 +00:00
Jilles Tjoelker
c57f58dea5 Move to a single /join function, avoiding confusion on "/join -window".
patch by exg
bug #644, thanks for the useful bug report


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5023 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-27 14:32:33 +00:00
Jilles Tjoelker
cb1f07352a Reject invalid level specifications in /set.
Most of these have names that end in "_level".


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5021 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-21 21:17:51 +00:00
Alexander Færøy
859d434c60 Prefer g_path_get_dirname() over g_dirname().
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5010 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-10 20:45:27 +00:00
Alexander Færøy
2fffcf5a77 Code Cleanup:
Use g_string_printf() instead of g_string_sprintf() (which is considered deprecated.)



git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5004 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-08 17:57:19 +00:00
Alexander Færøy
c561ba35e6 Code Cleanup:
Use g_string_append_printf() instead of g_string_sprintfa() (which is considered deprecated.)


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5003 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-08 17:22:42 +00:00
Emanuele Giaquinta
db1b74b7f9 Fix 'defination' typo.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4996 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-01-20 14:15:01 +00:00
Emanuele Giaquinta
8cc7a02b4d Rewrite pidwait using g_child_watch_add.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4975 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-30 11:51:27 +00:00
Emanuele Giaquinta
ad66af3c10 Remove useless net-sendbuffer init/deinit functions.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4971 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-22 00:11:33 +00:00
Emanuele Giaquinta
590ce173b3 Remove buffers GSList, it is unused since r1023.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4970 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-22 00:06:49 +00:00
Emanuele Giaquinta
cba15593f2 Aux-sort settings by key in settings_get_sorted.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4938 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-01 19:29:41 +00:00
Jilles Tjoelker
672022461a Improve SSL error display.
Display more detailed error messages about SSL and
fix assertion failure warnings on some SSL errors.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4933 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-30 22:48:39 +00:00
Emanuele Giaquinta
c335a16f71 Make needlessly global variable local where used.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4932 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-30 14:48:54 +00:00
Emanuele Giaquinta
75666168b7 Do not check for fcntl.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4931 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-30 14:33:14 +00:00
Emanuele Giaquinta
a8680fb7da Amend fix for bug #392, assume utf-8 encoding for an ascii string in
which no escape character occurs.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4928 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-29 10:45:58 +00:00
Emanuele Giaquinta
d6be6b9cff Factor code to check if a string is ascii only into a function.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4926 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-28 23:01:45 +00:00
Jilles Tjoelker
89cd47bf3a Allow storing multiple "other" prefixes such as +q and +a.
Original patch by JasonX, somewhat changed by exg and me.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4922 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-28 00:16:51 +00:00
Emanuele Giaquinta
04ea54a1a0 recode.h include fixup.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4892 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-10 00:31:00 +00:00