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

67 Commits

Author SHA1 Message Date
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
2d7030a844 Implement support for IRCv3.1 CAP negotiation 2015-05-05 23:14:26 +02: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
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
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
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 Hill
0d4f13d20f Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04: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
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
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
Emanuele Giaquinta
cad6fb2e19 Refactor code to create a watcher for an fd into a function.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4813 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-04-25 08:42:47 +00:00
Emanuele Giaquinta
7e4bc5c7f4 Remove unneeded includes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4784 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-29 10:26:05 +00:00
Emanuele Giaquinta
cdaf0c72e8 Make strstr_full_case internal.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4778 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-28 12:59:26 +00:00
Emanuele Giaquinta
72930e0be3 Use g_ascii_str{,n}casecmp for case insensitive comparison with
ascii only strings.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4739 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-09 12:17:55 +00:00
Emanuele Giaquinta
cb7d969963 Rename some variables.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4718 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-03 01:57:50 +00:00
Wouter Coekaerts
9c2d621cc6 Oops. Update address correctly now.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4490 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08 18:41:10 +00:00
Wouter Coekaerts
023026e12b Update FSF address
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4489 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08 18:16:58 +00:00
Wouter Coekaerts
f55a35185a Make parse_time_interval recognize negative times. Patch by Danijel Tasov and Elmar Hoffmann (Bug 23)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3990 dbcabf3a-b0e7-0310-adc4-f8d773084564
2005-09-10 12:51:43 +00:00
Valentin Batz
7a8c5f6763 Fixed bug with time settings where hours actually returned 60*hours
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3679 dbcabf3a-b0e7-0310-adc4-f8d773084564
2004-11-04 15:08:57 +00:00
Timo Sirainen
b886e97d5e added strocpy()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3238 dbcabf3a-b0e7-0310-adc4-f8d773084564
2004-03-23 22:07:55 +00:00
Timo Sirainen
1141081c34 parse_time_interval: x days were actually returned as hours. weeks were
returned as hours*7.. which also means I calculated the max. return value of
over 1 year wrong. It's actually 24 days, but it's hopefully enough. Removed
"weeks" unit to discourage usage of large values..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3143 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-11-16 17:26:43 +00:00
Timo Sirainen
f764a8665c Time parsing: allow omitting time unit without warning for backwards
compatibility.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3139 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-11-16 16:22:07 +00:00
Timo Sirainen
25fdeeaa8d Removed execute(), not used.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3107 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-01-31 04:03:06 +00:00
Timo Sirainen
842a51c760 parse_time_interval() fallbacked to milliseconds, not seconds. some code
cleanups. patch by Peder


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3094 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-01-08 20:54:36 +00:00
Timo Sirainen
bd6fe052bc Added time, size and level setting types. Breaks some settings - I'll add
automatic converter to these settings later. Meanwhile you CVS users can
fix your config files yourself :)

Time settings allow using "days", "hours", "minutes", "seconds" and
"milliseconds" or several of their abbreviations. For example "5d 4h
5msecs".

Size settings allow using "gbytes", "mbytes", "kbytes" and "bytes" or their
abbrevations. For example "5MB".

Level settings are currently handled pretty much the way they were before.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3080 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-12-28 17:54:13 +00:00
Timo Sirainen
c4c6428185 fix compiler warnings
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3077 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-12-28 14:20:24 +00:00
Timo Sirainen
dc8bd638e3 Irssi now uses 64bit file offets if it's only supported by system. Also did
a few changes to DCC so that it should be possible to send >4GB files.

DCC protocol uses 32bit "n bytes transferred" notifications, so I had to
bend the protocol a bit to allow 64bit files by truncating the value to
lowest 32bits. I'm not sure how other clients handle those notifications,
but irssi uses it only to figure out when the DCC SEND transfer is complete,
so it's quite safe to assume that if we've managed to write() all the bytes
and we receive the last 32bit of file size, it means the total file size
instead of the total - (n+1)*4GB.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3018 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-11-21 17:48:40 +00:00
Timo Sirainen
fe4cdce6e6 Handle correctly g_get_home_dir() returning NULL, assume it's the current
directory then.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2968 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-10-19 17:48:10 +00:00
Timo Sirainen
d11cb0f2c2 '\' characters in nicks were skipped when sending messages in queries.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2867 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-07-16 16:20:10 +00:00
Timo Sirainen
c0980aacdd missed isxdigit() -> i_isxdigit() change
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2432 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-02-12 03:04:34 +00:00
Timo Sirainen
f4897860b5 toupper(), tolower(), isspace(), is..etc..() aren't safe with chars in some
systems, use our own is_...() functions now instead.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2348 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-27 20:45:59 +00:00
Timo Sirainen
8996062276 moved the two { chars inside #ifdef #else #endif to one { outside it, so it won't confuse some parsers.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2295 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-04 21:27:28 +00:00
Timo Sirainen
98b82723a1 Added function expand_escapes() which handles now escaping /EVAL and input
line if /SET expand_escapes is set. Supported escapes are \t, \r, \n, \e
(ESC), \x (HEX, \x1b), \c (CTRL char, \cA), \000 (octal, \033)


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1727 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-08-08 20:00:25 +00:00
Timo Sirainen
4c51bc9755 get_max_column_count() didn't work properly if items had wider items than
max_width.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1551 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-06-11 15:05:08 +00:00
Timo Sirainen
666f4b2463 get_max_column_count() didn't return correct value in save_column_widths
when it returned only one column.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1510 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-05-21 23:46:48 +00:00
Timo Sirainen
1b8705bd44 Make sure there's always at least one column even if there's items
wider than max. width allows.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1320 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-03 21:01:18 +00:00
Timo Sirainen
a47ce2c449 Added strstr_full() and strstr_full_case()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1309 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-03 17:34:35 +00:00
Timo Sirainen
194dd60f36 /SET names_max_columns, /SET names_max_width: Limit width of /NAMES list.
Forced max. 6 columns limit to /HELP


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1199 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-10 04:54:09 +00:00
Timo Sirainen
7240717198 get_max_column_count(), columns_sort_list(): fixed to work properly
with empty list


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1176 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-02 22:09:11 +00:00
Timo Sirainen
4bcae4c071 get_max_column_count() didn't work properly when there was only one item
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1166 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-28 16:37:13 +00:00
Timo Sirainen
f5ea5348c0 get_max_column_count(): we didn't handle correctly a situation where
last column of the list was empty


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1165 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-28 16:27:09 +00:00
Timo Sirainen
e75ce196e8 get_max_column_count(), columns_sort_list(): helper functions for
printing column lists


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1160 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-28 15:43:38 +00:00
Timo Sirainen
93ba91b8ed Added my_asctime()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1114 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-14 18:16:39 +00:00
Timo Sirainen
1c9f45b4a4 Use GIOChannel instead of sockets directly. Helps porting to win32 :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@962 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-12-04 22:57:18 +00:00
Timo Sirainen
e7bfb7fe88 added g_timeval_cmp()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@904 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-30 23:12:42 +00:00
Timo Sirainen
cbf45ea6bf stristr() and stristr_full() didn't work correctly with empty needle
argument.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@898 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-30 01:14:49 +00:00
Timo Sirainen
2e96f68445 mkpath() crashed with paths that didn't start with /
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@867 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-25 20:54:24 +00:00
Timo Sirainen
d1d70fd5d7 s/enum GInputCondition/int/ - enums aren't supposed to orred together i
think.. at least MIPSpro gave warnings about it and it also feels wrong :)


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@865 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-23 23:29:32 +00:00
Timo Sirainen
8ce36c05ea several fixes to make irssi compile without warnings with MIPSpro
also fixed ctcp_queue_clean() - it might have crashed sometimes..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@859 dbcabf3a-b0e7-0310-adc4-f8d773084564
2000-11-23 21:40:07 +00:00