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

3501 Commits

Author SHA1 Message Date
Peder Stray
6b56f098e9 Change g_hash_table_contains() for compatibility with glib < 2.32 2015-04-20 08:01:01 +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
9890daca79 Handle nulls properly in the g_strcmp0() for glib<2.16
I wrote some tests to compare the behavior but I don't know where to put
them, so i'm including them here:

    assert(g_strcmp0("a", "b") == -1);
    assert(g_strcmp0(NULL, "a") == -1);
    assert(g_strcmp0("a", NULL) == 1);
    assert(g_strcmp0("b", "a") == 1);
    assert(g_strcmp0("a", "a") == 0);
    assert(g_strcmp0(NULL, NULL) == 0);
2015-04-11 15:09:53 -03:00
dequis
ef0877f484 Define g_strcmp0 to strcmp if the glib version is older than 2.16 2015-04-07 23:01:09 -03: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
Alexander Færøy
9ffe52ec5e Merge pull request #233 from dgl/hilight-fix
Make sure NO_ACT isn't cleared when -actcolor %n is used
2015-04-08 03:32:45 +02:00
Adam
28aaa653cf Add SNI support 2015-04-07 15:01:57 -04: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
Alexander Færøy
ac5aebb91f Merge pull request #217 from Lohhari/lastlog-date
Added a -date parameter to /lastlog to prepend each row with the ...
2015-03-01 11:44:28 +01:00
Hans Nielsen
7beffbdcc5 Add help files for proxy module 2015-02-24 19:53:23 -08:00
Hans Nielsen
bbf404b611 Fix whitespace 2015-02-24 19:53:23 -08:00
Hans Nielsen
178d595c96 Add port to proxy client struct for Perl scripts 2015-02-24 19:53:23 -08:00
Hans Nielsen
6a28bad814 Add boolean toggle for irssiproxy being enabled 2015-02-24 19:52:17 -08:00
Hans Nielsen
aaa0f73eac Make proxy messages include more detail and add status command 2015-02-24 19:52:17 -08:00
Hans Nielsen
d27c54486f Change around connection signals in proxy module
Change "proxy client connected" to "proxy client connecting" to avoid being confused by clients that have connected but not necessarily authenticated. Emit "proxy client connected" once authenticated, keeping the name for backwards compatibility.
2015-02-24 19:52:17 -08:00
Alexander Færøy
8657cd22cf Merge pull request #225 from dequis/silence-unused-value-warnings
Silence unused value warnings in perl binding code
2015-02-17 11:04:49 +01:00
Ailin Nemui
ee3eaa5428 fix crash in layout code when encountering wrong config 2015-02-17 09:50:55 +01:00
Ailin Nemui
fef25d6a35 Make the config parser more robust
We add some additional checks into the config parser's
node_section_index, node_traverse and node_set_str functions. In
particular, we check if the requested node is of scalar or complex type
and whether this matches the value found in the config. If it does not
match, then a warning is issued appropriately and the config is
corrected.
2015-02-17 09:50:55 +01:00
Ailin Nemui
1e4f7e6324 Refuse to load broken configs on irssi start
By temporarily raising the fatal log level to critical during irssi
start-up, we make it fail when the config file is broken. This is then
re-set so that /reload of a broken config file will not crash irssi and
just report the errors and gracefully continue instead.
2015-02-17 09:50:55 +01:00
Ailin Nemui
af6b789d2a Warn the user instead of crashing on wrong config
The change introduced in #191 will crash irssi immediately if you
accidentally try to /reload certain broken config files. It is enough to
warn the user in this case, so we turn g_error into g_critical.
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
dequis
8e8bc5fdbc Silence unused value warnings in perl binding code
sed -i 's/hv_store/(void) &/'

This only results in a warning in older gcc versions, but that includes
the one used in the Travis CI environment by default
2015-02-16 13:45:14 -03:00
Vesa Pirila
895ac10c4e lastlog.c is a mix of tab and space indentation. My changes now use tabs. 2015-02-16 09:49:22 +02:00
mauke
b4b4ebfadf accept freenode extbans in /ban [#150] 2015-02-08 22:16:01 +01:00
Vesa Pirila
cd5a571fd8 Added customization possibility for the lastlog date format, lastlog_date 2015-02-08 16:58:30 +02:00
Vesa Pirila
466166010b Added a -date parameter to /lastlog to prepend each row with the row's date 2015-02-08 13:00:51 +02: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
b2fe861156 Merge pull request #191 from dgl/config-error
Die if the wrong type of node is found when traversing config
2015-01-05 01:05:14 +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
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
89cdcecf76 Merge pull request #133 from pjcj/master
Speed up /reload when there are many ignores.
2014-12-16 20:39:33 +01:00
Alexander Færøy
cd7a30bf9a Merge pull request #189 from dequis/colorless-green-ideas-blink-furiously
Fix blinking/bold text in terminals with no color support
2014-12-16 20:28:56 +01:00
David Leadbeater
db62ddfd55 Die if the wrong type of node is found when traversing config
Fixes issue #187. It's a bit annoying this can't do anything other than
exit, however as there's no schema for the config it's only possible to
validate on use. This level of config can't be accessed from Perl so a
script can't cause Irssi to die (via this method at least).
2014-12-16 12:14:23 +00:00
dequis
367d8efc5f Fix blinking/bold text in terminals with no color support
Before this, doing "TERM=vt100 irssi" showed all text as bold and
blinking because of a failed check of window->term->TI_colors that
was doing (value & 8) and not expecting a value of 0.

The changed lines themselves look a bit weird, but they make more sense
in the context of the original commit, 96a292d4.
2014-12-14 18:21:40 -03:00
Geert Hauwaerts
08b390b11b Documentation fix for #185
Documentation fix for #185
2014-12-08 21:28:02 +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
Alexander Færøy
d87c494d89 Merge pull request #162 from dequis/self-messages
Receive 'self messages' in the right query window
2014-12-06 16:11:15 +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
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
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
ec0360b921 Merge pull request #147 from ahf/bugfix-143
Fix use-after-free bug with cached settings values
2014-10-06 20:43:01 +02:00
Alexander Færøy
3d6051a03e Merge pull request #140 from sebth/master
Make line splitting fail-safe
2014-10-01 21:55:56 +02:00
Alexander Færøy
a2121efed3 Merge pull request #142 from dequis/away-with-no-reason
irc_server_send_away: don't send empty param if there's no away reason
2014-10-01 21:54:00 +02:00
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
dequis
d68ee06aa4 irc_server_send_away: don't send empty param if there's no away reason 2014-09-09 21:14:07 -03:00
Sebastian Thorarensen
42a34a78e8 Make line splitting fail-safe
The userhost Irssi uses for line splitting can in some cases be wrong,
for instance when a proxy is used or when a server cloaks the hostname
without telling the client. Now Irssi always assumes the userhost is of
maximum length. 10 for username (common value) and 63 for hostname (in
RFC 2812).
2014-09-01 00:24:17 +02:00
Ailin Nemui
9f6c76b028 Add the signal for printtext_after that was missed in the original commit.
Now properly sends "gui print text after finished" signal when using
the printtext_after API that was fixed after 0.8.16
2014-08-25 14:50:41 +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
Alexander Færøy
d40c0704f0 Merge pull request #123 from ailin-nemui/terminfo-scroll-check-bounds
Add bounds check to array access in terminfo driver.
2014-08-09 12:24:45 +02:00
Ailin Nemui
836d386823 Add bounds check to array access in terminfo driver.
this fixes a crash due to illegal memory access that can occur if
something is printed to the screen on the "terminal resized"
handler. It is not clear to me whether this race condition can be
triggered by external incoming messages, but it might be better safe
than sorry.
2014-08-09 11:40:37 +02:00
tomaw
2346d3b62f Merge pull request #109 from cpbills/master
Fix right aligned statusbar item redrawing
2014-08-08 18:57:50 +01:00
Geert Hauwaerts
f0aa2d2049 Syntax rewrite of U-Z commands
Rewrote the syntax documentation of U-Z commands.
2014-08-05 22:00:30 +02:00
Alexander Færøy
b9f532568b Merge pull request #118 from ailin-nemui/mirc_blink_fix-fix
fix mirc_blink_fix
2014-08-05 21:21:37 +02:00
David Leadbeater
1dbc3dba78 Fix rawlog saving after dac67a5 broke it 2014-08-05 17:33:50 +01:00
Ailin Nemui
b602372e78 fix mirc_blink_fix
the background colours were totally off with mirc_blink_fix
enabled. oops.

reported by wodim
2014-07-31 03:09:19 +02:00
Geert Hauwaerts
5a4e535cd7 Merge pull request #112 from ailin-nemui/italics-exception
fix rules for italics emphasis
2014-07-30 22:24:24 +02:00
Geert Hauwaerts
4beebe3238 Removed the obsolete SQUERY and SERVLIST commands
Removed the obsolete SQUERY and SERVLIST commands.
2014-07-30 13:02:26 +02:00
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
Ailin Nemui
1cf7017ac9 fix colour 0 again
the previous commit was broken, as it conflicted with the colour
\#000000. Now both the "real colour black" and the "terminal colour 0"
are working.
2014-07-24 00:11:42 +02:00
Ailin Nemui
41fab0707f restore the colour 0 ("black") that got broken by extended colours
the colour 0 was broken by the extended colours patch because it needs
an explicit bit check (lower bits will be false since it is 0)

Thanks to lhynes for the report
2014-07-23 23:42:05 +02:00
Christopher P. Bills
6a5f04b26a Fix right aligned statusbar item redrawing
Fixes Github issue #97 https://github.com/irssi/irssi/issues/97

Fix proposed by ailin-nemui, built and tested on Debian Jessie using
0.8.15 source, tested by GeertHauwaerts as well.
2014-07-22 22:03:46 -04:00
Ailin Nemui
8e062b7bd0 fix uninitialised copy on 24bit colours 2014-07-18 13:56:02 +02:00
Geert Hauwaerts
dde8540e3e Removed the obsolete RPING command
The RPING command is obsolete.
2014-07-14 20:38:01 +02:00
David Hill
6e45d68399 Avoid using uninitalized values. 2014-07-12 16:35:42 -04:00
Geert Hauwaerts
938598e271 Removed the obsolete NOTE command
I removed the binding for the NOTE command that doesn't exist anymore on
any major network.
2014-07-09 18:33:10 +02:00
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
David Leadbeater
7fe47826ea Suggest /HELP rather than HELP
At this point cmdchars is definitely / and the user might not know they
need to add / to a command.
2014-07-08 09:24:12 +01:00
David Leadbeater
4e2299f1b7 Change to printtext for first time message too 2014-07-08 09:23:55 +01:00
David Leadbeater
47d66d214f Only show banner if not connecting to servers
It's tricky to make the banner show first in all cases and it's unlikely
to be seen if someone is connecting to a server already, so just don't
show it.
2014-07-08 01:38:08 +01: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
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
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
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
ff08b3b022 Replace a `goto out' with explicit freeing 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
7bfe3a8fa1 Introduce a MAX_USERHOST_LEN constant for IRC 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
29a49c4688 Move the definition of the `split_line' settings 2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
bb7bafc93c Split long IRC `ACTION' messages
Add line splitting logic to commands `/me' and `/action'.
2014-07-06 23:24:10 +02:00
Sebastian Thorarensen
90f3dd612e Fix the userhostlen' fallback in split_message'
ferret, the author of `splitlong-safe.pl' pointed out that `userhostlen'
should not only contain the maximum length of the hostname, but also the
maximum length of the username. Now 10 is used as the maximum username
length as a fallback. (`splitlong-safe.pl' uses the same limit.)

The username limit isn't defined in the standard, but 10 is common on
many networks. The odds that something goes wrong here is low, as
 1) the fallback limit is only used when the user has not yet joined a
    channel
 2) the maximum hostname length (63) gives some error margin as the
    hostname usually is shorter
2014-07-06 23:24:09 +02:00