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

3433 Commits

Author SHA1 Message Date
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
Sebastian Thorarensen
281c6d437d Avoid unnecessary splitting of lines
`split_line_end' could force lines to be unnecessarily split. This
commit fixes the problem by making sure that the last line isn't shorter
than `split_line_end'.
2014-07-06 23:24:09 +02:00
Sebastian Thorarensen
5c05c854dc Add configurable split line prefixes and suffixes
Add settings `split_line_start' and `split_line_end' analogous to
`splitlong_line_start' and `splitlong_line_end' in `splitlong.pl'. The
prefixes and suffixes are concatenated with a wrapper function to keep
`recode_split' and `strsplit_len' simple.
2014-07-06 23:24:09 +02:00
Sebastian Thorarensen
e6147fb8f2 Properly split long IRC messages
This commit adds handling of long IRC messages to the core. In contrast
to the `splitlong.pl' plugin, multi-byte encoded and recoded messages
are properly split.

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

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

`split_message' in the IRC module uses `recode_split' which in turn uses
iconv to properly split multi-byte encoded (and recoded) messages.
2014-07-06 23:24:09 +02:00
Alexander Færøy
b03b65e029 Merge pull request #85 from dgl/werror
Make configure checks able to build with -Werror
2014-07-06 23:05:34 +02:00
David Leadbeater
dac67a567d Check return values from some syscalls and warn if they fail 2014-07-06 21:52:03 +01: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
Geert Hauwaerts
8c1e7d9c17 Updated the startup banner + added generic banner
I updated the banner displayed when you start Irssi for the first time
and I have added a banner that will be displayed everytime you start
Irssi.
2014-07-06 22:23:17 +02: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
Alexander Færøy
2ff95c0649 Merge pull request #82 from ailin-nemui/256colour-cleanup
fix compiler warnings in extended colour code
2014-07-06 19:58:26 +02: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
Ailin Nemui
c104627462 fix compiler warnings in extended colour code 2014-07-04 12:46:51 +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
Alexander Færøy
aa7492d099 Merge pull request #70 from dgl/regexp-pattern-missing
Make it more obvious if -pattern wasn't provided to a regexp /ignore
2014-07-02 21:17:51 +02:00
Alexander Færøy
f779e04a9d Merge pull request #72 from dgl/regexp-error
Warn with error if regexp ignore fails to parse
2014-07-02 21:15:45 +02:00
David Leadbeater
a9d9756d4d Make /ignore -replies work with NO_ACT 2014-06-30 09:35:31 +01: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
David Leadbeater
6bbb114046 Remove NO_ACT if we see a user specified hilight
In this path we can't look up ignores again because the print text signal
doesn't know the nick, etc. Instead just show it. The user can use -actcolor %n
or make the hilight more specific if desired.
2014-06-30 00:32:09 +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
David Leadbeater
96701b6c68 Make it more obvious if -pattern wasn't provided to a regexp /ignore 2014-06-30 00:19:27 +01:00
Tom Feist
2d4edc5187 Initial implementation of 256 colour support for Irssi
This patch implements some 256 colour support for Irssi up from the
previous 16 colours. Initial parsing of the %x/%X format codes is
implemented and the parser accounts in advances the char* for
that.

The colour attributes are widened from 4 to 8 bit. The colour protocol
is changed to a new format. Some pointers to remaining work are
written in the comment in textbuffer.h.

Note that Irssi already does support requesting 256 colours from the
terminal in the original source code, so this part did not have to be
touched.
2014-06-30 00:54:16 +02:00
Alexander Færøy
2e6f16c0fa Merge pull request #11 from ailin-nemui/print_text_after_time-api
add print_text_after_time to specify time stamp for lines
2014-06-30 00:07:14 +02:00
Alexander Færøy
2b6bba3fd2 Merge pull request #62 from dgl/prefix-nick-flags
Use PREFIX from 005 to decide if a nick flag is of op level
2014-06-29 14:32:15 +02:00
Alexander Færøy
aaa0cb6e03 Merge pull request #52 from dgl/stack-cleanup
Correct use of perl stack macros
2014-06-29 14:27:12 +02:00
Alexander Færøy
cce0ff80a2 Merge pull request #49 from dgl/stackem
Move PUTBACK to within the scope which uses the stack
2014-06-29 14:24:20 +02:00
Ailin Nemui
e71c9f1b06 add print_text_after_time to specify time stamp for lines
add signal for line removal from textbuffer
2014-06-27 15:50:36 +02:00
David Leadbeater
6accf50991 Use PREFIX from 005 to decide if a nick flag is of op level
Fixes #61.
2014-06-27 14:13:55 +01:00
Dave Reisner
f0925de16b s/INCLUDES/AM_CPPFLAGS/g
Silences warnings on recent automake such as:

src/core/Makefile.am:3: warning: 'INCLUDES' is the old name for
'AM_CPPFLAGS' (or '*_CPPFLAGS')
2014-06-27 09:06:21 -04:00
Alexander Færøy
113f1724d7 Merge pull request #44 from dajohi/g_basename
Replace deprecated g_basename with g_path_get_basename.
2014-06-27 14:41:54 +02:00
Alexander Færøy
b8c2915d79 Merge pull request #59 from ailin-nemui/perl-pl-na
get rid of PL_na
2014-06-27 14:31:04 +02:00
Alexander Færøy
e4051eb42e Merge pull request #60 from dgl/perl-no-get-context
Define PERL_NO_GET_CONTEXT in all perl source files
2014-06-27 14:25:52 +02:00
David Leadbeater
c5d81c598d Correct use of perl stack macros
Further to pull #49 this is the result of an audit of the use of perl
stack macros. There were several cases where PUTBACK was being called
where the stack pointer could be out-of-date.

Also some misc. cleanup where the macros were used needlessly.
2014-06-27 11:20:48 +01:00
David Leadbeater
211422cbe8 Switch to using G_DISCARD for call_pv
PUTBACK was being called even for the error path which didn't use the
stack. Emitting the "script error" signal can involve running Perl code
(Irssi:core::destroy) therefore the stack can be reallocated. This
can result in the perl stack being corrupted because the local stack
pointer is out of date (although as it's use of freed memory the crash
is not always instant).
2014-06-27 11:08:01 +01:00
David Leadbeater
051d1587b0 Add missing include
Silences:
  listen.c:320:3: warning: implicit declaration of function ‘ascii_strup’ [-Wimplicit-function-declaration]
2014-06-26 01:12:33 +01:00
David Leadbeater
b34ded063b Remove unused variables to silence compiler warnings 2014-06-26 00:47:49 +01:00
David Leadbeater
86fcadb85d Add some missing casts to silence compiler warnings 2014-06-26 00:44:07 +01:00
Ailin Nemui
f58a461c54 cleanup char* casts and replace one useless SvPV with SvPV_nolen 2014-06-25 03:17:03 +02:00
David Leadbeater
43df6e424e Define PERL_NO_GET_CONTEXT in all perl source files
This removes the calls to Perl_get_context() that get automatically
added to XS code for ancient source code compatibility reasons.

The result is about a ~60K size reduction in the binary (based on
comparing two 64-bit stripped irssi binaries compiled
--with-perl-staticlib).
2014-06-24 20:20:27 +01:00
Lukas Mai
7dbb8efdde get rid of PL_na 2014-06-24 16:45:55 +02:00
David Hill
9d6cd87b0f Replace deprecated g_basename with g_path_get_basename. 2014-06-22 20:39:35 -04:00
Alexander Færøy
c26a634fe6 Merge pull request #53 from dajohi/braces
Fix compiler warning.
2014-06-21 10:59:55 +02:00
Alexander Færøy
dcbcb5f04d Merge pull request #50 from dajohi/cmd_null_deref
Avoid potential null dereferences.
2014-06-21 10:53:00 +02:00
David Hill
444f9e4836 Do not break strict-aliasing rules.
dcc-send.c:296:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules
2014-06-20 12:43:24 -04:00
David Hill
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
David Hill
70a55030d1 Avoid potential null dereferences. 2014-06-20 00:07:47 -04:00
Alexander Færøy
9d0d4d9437 Merge pull request #14 from ailin-nemui/ignore-activity
NO_ACT level to ignore activity
2014-06-19 00:15:36 +02:00
Alexander Færøy
ea704df7e0 Merge pull request #20 from ailin-nemui/broken-signal-parser
fix signals parser
2014-06-19 00:00:54 +02:00
Ailin Nemui
b05b6cde4d fix signals parser 2014-06-18 23:54:17 +02: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
Alexander Færøy
b7c1fbd2b9 Merge pull request #42 from dgl/no-dancer
Revert "add d,q,f and J to CHANMODES default, to work a bit better with ...
2014-06-18 23:15:47 +02:00
Alexander Færøy
bb11725a52 Merge pull request #23 from ailin-nemui/perl-format_get_text
fix implementation of format_get_text script api
2014-06-18 22:56:37 +02:00
Alexander Færøy
53e5f9f26a Merge pull request #22 from ailin-nemui/perl-package-fixes
Correct the packages of the scripting API
2014-06-18 22:53:34 +02:00
Alexander Færøy
8c08eef87a Merge pull request #12 from ailin-nemui/no-split-utf8
no split utf8 from the bug tracker
2014-06-18 22:53:01 +02:00
Kuang-che Wu
fc4a4d2471 Fix UTF-8 character corruption every 32kb of text buffer 2014-06-18 22:47:17 +02:00
David Leadbeater
908913b5de Revert "add d,q,f and J to CHANMODES default, to work a bit better with dancer and possibly others"
This is no longer relevant and most ircds now send a correct isupport
message.

This reverts commit b832f1f7b2.
2014-06-16 15:35:38 +00:00
David Leadbeater
e3c688d061 Add -usermode to /NETWORK syntax 2014-06-16 14:47:38 +00:00
Ailin Nemui
24ea87bd27 fix implementation of format_get_text script api 2014-06-16 01:55:46 +02:00
Ailin Nemui
21bf59f4c1 correct package of server gui_printtext_after 2014-06-16 01:55:46 +02:00
Ailin Nemui
31c7c8eb95 fix package of term_refresh_* script api 2014-06-16 01:55:46 +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
Jaroslav Škarvada
d1e60a3b8f Disallow unloading of static modules 2014-06-15 22:48:43 +02:00
Alexander Færøy
75d7e1b0bb Merge pull request #37 from dajohi/g_ascii_strcasecmp
g_strcasecmp -> g_ascii_strcasecmp
2014-06-15 22:36:57 +02:00
David Hill
9e47f34c3f g_strcasecmp -> g_ascii_strcasecmp 2014-06-15 16:20:58 -04:00