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

1597 Commits

Author SHA1 Message Date
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
Jari Matilainen
0c26aeb9fc Make sure port is only set on /server modify if specified 2017-05-15 23:07:01 +02:00
ailin-nemui
81cf8d8813 Update fe-server.c 2017-05-14 09:43:38 +02:00
Jari Matilainen
4a6fbdbe78 Spaces to tabs 2017-05-14 03:01:01 +02:00
Jari Matilainen
783458e9ba Added code comments 2017-05-11 14:08:45 +02:00
Jari Matilainen
25f9c71f69 Allow -port <num> or irc.host.tld <port num> in /server add and /server modify 2017-05-11 14:02:23 +02:00
Jari Matilainen
f060292a9c Added braces 2017-05-11 11:17:14 +02:00
Jari Matilainen
dbde9f0fe3 Added support for -notls and -notls_verify 2017-05-11 10:57:24 +02:00
LemonBoy
c890ecafa0 Merge pull request #686 from josephbisch/remove-history-wrap
Don't allow command history to wrap around
2017-04-11 15:19:19 +02:00
Joseph Bisch
3297fafcd9
Add syntax info for completion
Allows syntax info to be picked up and displayed by help command.

Fixes #687
2017-04-07 12:56:46 -04:00
Joseph Bisch
405136440c
Remove over_counter
We are no longer using over_counter for any functional purpose, so
remove it.
2017-04-07 08:20:28 -04:00
Joseph Bisch
7c86575b02
Don't allow command history to wrap around
This changes the behavior of the command history to avoid wrapping back
to the bottom once the top of the history is reached.
2017-04-06 20:27:39 -04:00
Joseph Bisch
41776d71f7
Fix strange history behavior when history is empty
If text is being entered and then the user presses the up arrow
followed by the down arrow, the expected behavior is to return to the
text being entered. Prior to this commit that was not the case.

Fixes #462
2017-04-05 11:00:25 -04:00
ailin-nemui
e2e02160cd Merge pull request #645 from LemonBoy/keyboard-misc
Timeout feature for keys
2017-03-11 23:11:43 +01:00
Ailin Nemui
77b2631c78 Merge branch 'netjoin-timeout' into 'master'
fe-netjoin: remove irc servers on "server disconnected" signal

Closes #7

See merge request !10
2017-03-10 17:18:18 +01: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
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
dequis
7c09b72848 fe-netjoin: remove irc servers on "server disconnected" signal 2017-02-27 23:43:37 -03: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
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
LemonBoy
98ead50b4e Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
2017-02-14 14:46:14 +01: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
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
ailin-nemui
17fc77565e fix regression in completion
fixes #609
2017-01-09 13:19:37 +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
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
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
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
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
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
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
LemonBoy
5efb3077d5 Merge pull request #565 from ahf/bug/524
Kill bell_beeps.
2016-11-29 22:13:53 +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
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
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
4e170c5233
Declare variables in the beginning of the function. 2016-10-22 22:04:32 +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
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
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
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
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
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
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
ailin-nemui
681caf2b58 fix nick->host == NULL crash 2016-08-22 12:27:10 +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
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
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
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
LemonBoy
5c8423a08c Add a space after the comma when listing the options. 2016-06-13 20:27:37 +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
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
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
LemonBoy
0060f682c2 Factor out some redundant code and remove hashtable_get_keys 2016-06-05 17:24:27 +02:00
LemonBoy
7a3c6fe86c Replace strarray_length with g_strv_length 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
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
29beafcf6f Improve UTF-8 handling in display_sorted_nicks(). 2016-05-13 04:08:15 +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
21c07c0060 Leverage string_policy(). 2016-05-13 02:27:19 +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
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
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
132d3c49f3 strip less whitespace from commands
fixes #445
2016-03-20 22:39:06 +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
Jari Matilainen
857e27aef6 Don't use glob matching, just regular string comparisons 2016-03-17 23:58:46 +01: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
dequis
7674fd5936 completion: Fix crash when the complist provided by a script has nulls
Can be reproduced with aspell_complete.pl 1.00 by setting an invalid
dictionary with "/set spell_dict a"
2016-01-29 10:40:18 -03:00
LemonBoy
d964950e5d Serialize the 'name' attribute of the CHANNEL_REC.
This way the code doing the serialization in 'sig_layout_save_item' is
now symmetric with the loading code loading the data in
'sig_layout_restore'.
2016-01-25 20:48:13 +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
ailin-nemui
bd2c549064 Merge pull request #394 from ailin-nemui/reset-history
option to clear the history
2016-01-11 21:04:48 +01:00
ailin-nemui
8f37095969 Merge pull request #389 from ailin-nemui/hilight2-up
keep track of address in text_dest for hilight purposes
2016-01-11 21:04:43 +01:00
ailin-nemui
ad842ea8a6 reorder history add and fixes 2016-01-08 15:42:59 +01:00
ailin-nemui
4659cea65a option to clear the history 2016-01-08 15:19:13 +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
7cc85b9427 keep track of address in text_dest for hilight purposes 2015-12-28 01:08:35 +01:00
ailin-nemui
5fbad764df clean up after #303 2015-12-15 00:08:44 +01:00
ailin-nemui
074af68578 Merge pull request #303 from vague666/fs275
Applied patch from fs#275 to make /hilight -mask -line work properly
2015-12-15 00:07: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
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
ailin-nemui
20fe5d0c7f add missing file to Makefile 2015-12-09 14:23:15 +01:00
ailin-nemui
229c600e99 Merge pull request #174 from ailin-nemui/entry-prompt-colours
reimplement format and length logic for the entry prompt
2015-12-09 12:01:00 +01:00
LemonBoy
0171b1a634 Use the expanded filename when picking the awaylog
This fixes a long-standing bug where 'fname' was being feed to cat
instead of 'real_fname', causing it to quit with a 'No such file or directory'
error.

FS#377
2015-11-22 21:59:28 +01:00
ailin-nemui
fbb838b3b0 Merge pull request #350 from LemonBoy/fix-99
Strip trailing whitespace from commands
2015-11-18 22:01:29 +01:00
ailin-nemui
ac04fa7413 Merge pull request #351 from vague666/hilight_default_behaviour
Fix /hilight list output behaviour depending on enabled flags
2015-11-10 11:07:16 +01:00
Jari Matilainen
b333d10364 /hilight list print output with enabled flags, except when -word and -nick are used 2015-11-09 23:06:56 +01:00
LemonBoy
d4676c9855 Use the PARAM_FLAG_STRIP_TRAILING_WS flag wherever possible. 2015-11-09 23:02:41 +01:00
LemonBoy
3d9b9d473f Strip the trailing whitespace from /join commands.
Fixes #99 for great good.
2015-11-09 18:42:49 +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
Alexander Færøy
685d8fe5b0
Add SETTING_TYPE_ANY and replace -1 with it. 2015-10-03 19:01:16 +02:00
dx
c3e4664870 Merge pull request #294 from dequis/key-states-rescan-recursion-limit
Limit recursion depth of key/combo expansion in key_states_scan()
2015-10-02 07:22:48 -03: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
b04b5f0f1d Make sure sasl settings are defined before printing them out 2015-09-29 11:44:11 +02:00
Jari Matilainen
cff536ab70 Add sasl info to /network list output if available 2015-09-29 10:39:49 +02:00
ailin-nemui
18989e76db Merge pull request #304 from LemonBoy/sasl_user_options
Allow the user to set and modify the SASL parameters
2015-09-26 19:07:54 +02:00
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
Jari Matilainen
deb6ca1b1a Applied patch from fs#275 to make /hilight -mask -line work properly 2015-09-24 13:03:02 +02:00
dequis
9da445ab86 Drop some glib version checks that are not needed anymore
The g_strcmp0 fallback in particular was broken since it was used in a
few places as a GCompareFunc, and macros don't work that way.

Yes, that one was my fault, but nobody complained :D
2015-09-23 13:58:22 -03:00
dequis
f247a43b97 sig_message_irc_op_public: fix nickmode lookup, use cleantarget instead 2015-09-22 19:35:10 -03: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
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
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
dequis
99f074b0db fe_channel_skip_prefix: fix return value (FALSE/NULL isn't valid)
The return value is a char*, and here it was false which is 0 which is
more or less the same as null.

That could have been a crash somewhere, the functions that call this
don't expect null ever.
2015-09-22 01:17:15 -03:00
dequis
bf36f71b99 Fix #291, "/msg +#channel incorrectly shows up as Nick:@#channel"
Just passing the full target to the "message irc op_public" signal
handler and letting it do the cleanup.

The fe_channel_skip_prefix() call in event_privmsg() is kept because
recode_in() needs a real channel name, but

There was similar code in sig_message_own_wall(), but that one is
correct - the /wall command always sends NOTICE @#chan, so I added a
comment down there to make it clear.
2015-09-22 00:01:04 -03:00
dequis
0823289fd9 Limit recursion depth of key/combo expansion in key_states_scan()
Fixes FS#817 - "SegFault when executing bind command", which provides
the test case "/bind cleft key meta", which is stupid but now it doesn't
break things.

The limit of 100 is arbitrary, it means roughly 140 stack frames total.
The flyspray ticket mentions it crashes at 512, in my system it goes all
the way to 149677 stack frames.

http://bugs.irssi.org/index.php?do=details&task_id=817
2015-09-21 22:59:24 -03: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
dequis
f37f6ac0ed Add two missing #include "fe-irc-channels.h"
Fixes #285
2015-09-18 23:56:17 -03: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
4346c2a6d4 Move the function prototypes in a separate header 2015-09-09 23:55:00 +02:00
LemonBoy
57d645f246 Introduce some more chantypes awareness 2015-09-02 21:50:40 +02:00
Geert Hauwaerts
6fcafc5993 1k+ windows are now the default formatting (#223)
1k+ windows are now the default formatting (#223)
2015-06-12 21:13:45 +02:00
LemonBoy
16c71cf1fb Implement CHANTYPES support 2015-05-15 17:07:30 +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
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
David Leadbeater
f5331a3df5 Make sure NO_ACT isn't cleared when -actcolor %n is used
Fixes issue #227.
2015-04-07 10:26:28 +01:00
Ailin Nemui
ee3eaa5428 fix crash in layout code when encountering wrong config 2015-02-17 09:50:55 +01: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
8e64aee42a Merge pull request #115 from ailin-nemui/fix-hat-key
Make ^ key and Ctrl+^ key usable with /BIND
2015-02-16 22:15:04 +01:00
KindOne
4bf9e1f16a Do not let the ctcp action of an inital query go into the status window. 2015-01-17 08:11:10 -05:00
Alexander Færøy
1136ea915a Merge pull request #164 from ailin-nemui/fix-ansi-reset
Fix reset of attributes with ansi
2014-12-16 20:41:22 +01:00
Alexander Færøy
dbcfb7060b Merge pull request #161 from anadrome/patch-1
Update old bug URLs
2014-12-06 16:12:03 +01:00
Ailin Nemui
b03805eeb9 reimplement format and length logic for the entry prompt 2014-11-10 10:53:14 +01:00
Ailin Nemui
77a90effe3 Fix reset of attributes with ansi
reported by Christopher Ohlsson (dmnc)
2014-10-28 10:50:26 +01:00
dequis
1edfcedda1 Receive 'self messages' in the right query window
Original patch by hondza <sedaj2@gmail.com>, from FS#833. I applied
several needed style changes, and rebased to current HEAD.

This implements the IRCv3.2 self-message extension partially (we can't
announce its support through CAP yet). This is also the format used by
the 'privmsg' znc module, and is already implemented by several other
clients.
2014-10-26 00:33:20 -03:00
mjn
8e29a70a82 Update old bug URLs
At some point in the past few years, Flyspray changed its URL scheme from id=nnn to task_id=nnn, which broke some old comments in the source. Update those comments to URLs that still work.
2014-10-25 17:00:27 +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
Michael Vetter
51239925ec source cleanup: remove trailing whitespaces 2014-09-11 19:10:33 +02:00
Ailin Nemui
09f23d06b5 Modify escape of ^ key so it can be used as well as Ctrl+^
Fixes FS#721

This makes Ctrl+^ and ^ bindable again as different keys. We do this
by escaping single `^` as `^-`, which is not a valid control character
(unlike `^^`)

The original approach suggested in FS#721 is insufficient, it will
break bindings such as `meta-^` because Irssi is convinced that `^`
introduces a Control-key ("key combo") so it is waiting for what may
follow.
2014-07-28 13:58:13 +02:00
Ailin Nemui
07e37c2329 fix rules for italics emphasis
while the last patch did stop /path/.xxx from turning italic, it also
stopped any other /emphasis/ from becoming italic. correct this by
testing for ispunct, so spaces are valid italic terminators
2014-07-24 09:42:57 +02:00
David Hill
6e45d68399 Avoid using uninitalized values. 2014-07-12 16:35:42 -04:00
Ailin Nemui
a5a7fdbe5f more strict rules for italic emphasis to avoid file name clashes
this additional check avoids /root/.hiddendir from italicising /root/,
because that is often used in path names
2014-07-08 13:42:06 +02:00
Alexander Færøy
a9ff985a91 Merge pull request #15 from ailin-nemui/hilights-network-tag
FS#155 hilight -tag
2014-07-07 22:49:29 +02:00
Ailin Nemui
d3093418d4 cleanup hilight -network patch 2014-07-07 22:45:29 +02:00
Alexander Færøy
09a1801186 Merge pull request #58 from ailin-nemui/italics
Implement italics support for Irssi
2014-07-07 22:16:23 +02:00
Alexander Færøy
99b629ab20 Merge pull request #29 from sebth/master
Properly split long IRC messages
2014-07-07 18:27:57 +02:00
Manuel Leiner
669add63e8 FS#155 hilight -tag 2014-07-07 00:42:50 +02:00
Lukas Mai
225d149968 optionally render /foo/ as italics 2014-07-07 00:32:07 +02:00
Lukas Mai
0e294d5c2e add italics support; don't use standout for reverse 2014-07-07 00:32:07 +02:00
Geert Hauwaerts
fc00b9e6f0 Added the missing -! and -noautosendcmd options
The SERVER ADD completion was missing the -! and -noautosendcmd options.
2014-07-06 23:58:13 +02:00
Geert Hauwaerts
2ff5f5b7e5 Fixed a compiler warning for statusbar_redraw
Fixed a compiler warning for statusbar_redraw.
2014-07-06 23:27:55 +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
Geert Hauwaerts
bea5cb6d02 Redraw the statusbar after reading the settings
I fixed a bug where the statusbar was not redrawn after reading the
settings.
2014-07-06 22:24:16 +02: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
Alexander Færøy
fd3676e407 Merge pull request #48 from ailin-nemui/256-colour-history
256 colour support for Irssi
2014-07-02 23:17:36 +02:00
Ailin Nemui
96a292d40e Finish 256 colour support for Irssi
256 colour patch is cleaned up and the remaining cases are made work,
this includes especially Theme support, which was not implemented
before. Changes not related to colours were reverted again, making a
review of the two patches against master easier to follow.

As a byproduct of the Hex-colour code parser, the 24bit colours are
also implemented. Actually using them in the terminal is guarded by a
compile time switch (as well as a run time switch), as it breaks the
existing colour protocol and requires additional storage.

To make a seamless usage, down-conversion is provided for 8 and 16
colours.

Diverging from Tom's approach, the colour protocol is reverted back to
the original one. Unfortunately, the changes required in the Theme
engine will break the API.

For more details, please refer to the patch documentation at either
http://irssi-docs.wikispaces.com/Notes-256-Colour or
https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour
2014-06-30 02:41:34 +02:00
David Leadbeater
3698ddfc3b Add NO_ACT checks for DCC messages 2014-06-30 00:32:21 +01:00
David Leadbeater
e8b0eb4986 Add NO_ACT checks for actions and notices 2014-06-30 00:32:17 +01:00