summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-07-06Fix minor coding style issues in message splittingSebastian Thorarensen
2014-07-06Allow `server.split_message' being NULLSebastian Thorarensen
Now a module can set `server.split_message = NULL' to disable message splitting, instead of having to implement the function.
2014-07-06Replace an indent of eight spaces with a tabSebastian Thorarensen
2014-07-06Replace a `goto out' with explicit freeingSebastian Thorarensen
2014-07-06Introduce a MAX_USERHOST_LEN constant for IRCSebastian Thorarensen
2014-07-06Move the definition of the `split_line' settingsSebastian Thorarensen
2014-07-06Split long IRC `ACTION' messagesSebastian Thorarensen
Add line splitting logic to commands `/me' and `/action'.
2014-07-06Fix the `userhostlen' fallback in `split_message'Sebastian Thorarensen
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-06Avoid unnecessary splitting of linesSebastian Thorarensen
`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-06Add configurable split line prefixes and suffixesSebastian Thorarensen
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-06Properly split long IRC messagesSebastian Thorarensen
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-06Merge pull request #85 from dgl/werrorAlexander Færøy
Make configure checks able to build with -Werror
2014-07-06Check return values from some syscalls and warn if they failDavid Leadbeater
2014-07-06Redraw the statusbar after reading the settingsGeert Hauwaerts
I fixed a bug where the statusbar was not redrawn after reading the settings.
2014-07-06Updated the startup banner + added generic bannerGeert Hauwaerts
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-06Initialize in6 correctlyDavid Leadbeater
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-06Merge pull request #82 from ailin-nemui/256colour-cleanupAlexander Færøy
fix compiler warnings in extended colour code
2014-07-06Make configure checks able to build with -WerrorDavid Leadbeater
Also fix a few compiler warnings, this combined with pull #82 allows me to build with CFLAGS="-Werror -Wall".
2014-07-04Merge pull request #80 from dgl/noactAlexander Færøy
Change NO_ACT so it can be combined with other levels
2014-07-04fix compiler warnings in extended colour codeAilin Nemui
2014-07-02Merge pull request #48 from ailin-nemui/256-colour-historyAlexander Færøy
256 colour support for Irssi
2014-07-02Merge pull request #70 from dgl/regexp-pattern-missingAlexander Færøy
Make it more obvious if -pattern wasn't provided to a regexp /ignore
2014-07-02Merge pull request #72 from dgl/regexp-errorAlexander Færøy
Warn with error if regexp ignore fails to parse
2014-06-30Make /ignore -replies work with NO_ACTDavid Leadbeater
2014-06-30Finish 256 colour support for IrssiAilin Nemui
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-30Add NO_ACT checks for DCC messagesDavid Leadbeater
2014-06-30Add NO_ACT checks for actions and noticesDavid Leadbeater
2014-06-30Remove NO_ACT if we see a user specified hilightDavid Leadbeater
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-30Don't expand ALL when combined with NEVER/NO_ACTDavid Leadbeater
2014-06-30Change NO_ACT so it can be used in addition to other ignoresDavid Leadbeater
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-30Warn with error if regexp ignore fails to parseDavid Leadbeater
2014-06-30Make it more obvious if -pattern wasn't provided to a regexp /ignoreDavid Leadbeater
2014-06-30Initial implementation of 256 colour support for IrssiTom Feist
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-30Merge pull request #11 from ailin-nemui/print_text_after_time-apiAlexander Færøy
add print_text_after_time to specify time stamp for lines
2014-06-29Merge pull request #62 from dgl/prefix-nick-flagsAlexander Færøy
Use PREFIX from 005 to decide if a nick flag is of op level
2014-06-29Merge pull request #52 from dgl/stack-cleanupAlexander Færøy
Correct use of perl stack macros
2014-06-29Merge pull request #49 from dgl/stackemAlexander Færøy
Move PUTBACK to within the scope which uses the stack
2014-06-27add print_text_after_time to specify time stamp for linesAilin Nemui
add signal for line removal from textbuffer
2014-06-27Use PREFIX from 005 to decide if a nick flag is of op levelDavid Leadbeater
Fixes #61.
2014-06-27s/INCLUDES/AM_CPPFLAGS/gDave Reisner
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-27Merge pull request #44 from dajohi/g_basenameAlexander Færøy
Replace deprecated g_basename with g_path_get_basename.
2014-06-27Merge pull request #59 from ailin-nemui/perl-pl-naAlexander Færøy
get rid of PL_na
2014-06-27Merge pull request #60 from dgl/perl-no-get-contextAlexander Færøy
Define PERL_NO_GET_CONTEXT in all perl source files
2014-06-27Correct use of perl stack macrosDavid Leadbeater
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-27Switch to using G_DISCARD for call_pvDavid Leadbeater
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-26Add missing includeDavid Leadbeater
Silences: listen.c:320:3: warning: implicit declaration of function ‘ascii_strup’ [-Wimplicit-function-declaration]
2014-06-26Remove unused variables to silence compiler warningsDavid Leadbeater
2014-06-26Add some missing casts to silence compiler warningsDavid Leadbeater
2014-06-25cleanup char* casts and replace one useless SvPV with SvPV_nolenAilin Nemui
2014-06-24Define PERL_NO_GET_CONTEXT in all perl source filesDavid Leadbeater
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).