1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-09 06:20:45 +00:00
Commit Graph

40 Commits

Author SHA1 Message Date
dequis
664c38afba Fix some glib deprecation warnings
Most of these have been deprecated since forever (2.2), but they didn't
raise warnings. Now they do, and the warnings are not the most verbose
warnings you could ask for, but, they point in the right direction.

This doesn't handle the GTimeVal deprecation warnings. Those seem
trickier since they cover API, will look into those right after this.
2019-10-31 23:49:40 +01:00
ailin-nemui
7e6e1f2e10 Use full paths to includes 2019-05-01 22:08:45 +02:00
Staron, Martin
3cbcb4fe85 dcc get shouldn't fail when file attrs can't be changed 2018-02-13 08:15:39 +01:00
ailin-nemui
9f0dc4766c fix dcc issue 2017-10-20 15:14:10 +02:00
Nei
200eb5922e Merge branch 'fix-gl9' into 'security'
Fix dcc_request where addr is NULL

See merge request !13
2017-05-30 19:39:06 +00:00
Joseph Bisch
528f51bfbe
Fix dcc_request where addr is NULL 2017-05-29 14:53:26 -04:00
Joseph Bisch
30a92754bb
Fix oob read of one byte in get_file_params_count{,_resume}
We can use continue to handle cases such as:
"ab<space><space>c"
2017-05-29 14:43:24 -04:00
ailin-nemui
dcffa98d46 add a static buffer for dcc received data
increased buffersize might make irssi freeze less / #159
2016-11-23 17:02:29 +01:00
LemonBoy
7a3c6fe86c Replace strarray_length with g_strv_length 2016-06-05 16:24:55 +02:00
LemonBoy
72712a0c62 Replace strocpy with g_strlcpy
The only difference was that the former returned 1 if the buffer was
overflown, but the return value was never checked.
2016-06-05 16:24:55 +02:00
LemonBoy
8b54366d95 Support quoted filenames in some /DCC commands 2016-03-22 16:00:00 +01:00
Robert C Jensen
b984f1fa25 dcc-get: close() the temp fd so we don't get ETXTBSY in ntfs mounts
Patch from debian bug 696963 [1]

Fixes github bug #220 and flyspray bug 867 [2]

[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696963
[2]: http://bugs.irssi.org/index.php?do=details&task_id=867
2015-09-23 23:39:37 -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
Michael Vetter
51239925ec source cleanup: remove trailing whitespaces 2014-09-11 19:10:33 +02:00
David Hill
9d6cd87b0f Replace deprecated g_basename with g_path_get_basename. 2014-06-22 20:39:35 -04:00
David Hill
0d4f13d20f Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp. 2014-06-10 12:06:19 -04:00
Alexander Færøy
2fffcf5a77 Code Cleanup:
Use g_string_printf() instead of g_string_sprintf() (which is considered deprecated.)



git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5004 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-08 17:57:19 +00:00
Emanuele Giaquinta
ba80576b1e Remove some global variables used to store settings values, instead get the
values when needed.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4836 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-05-19 21:55:04 +00:00
Emanuele Giaquinta
d9782fab84 Fallback on rename also when errno is ENOSYS/EOPNOTSUPP because
FUSE/BSD sets this value when link is not available.
Based on a patch by Juuso Tähkäpää, bug 536.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4631 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-10-29 15:37:31 +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
Emanuele Giaquinta
a42b4202f2 Fix DCC get when file size is 0, bug #494.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4462 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-04-25 19:22:39 +00:00
Valentin Batz
fd476e8b31 Make the compiler happy by replacing 'const char *' by 'char *'.
Pass the pointer to the SERVER_REC to dcc_ctcp_message.
Recode 'own' messages back for printing just before they actually get printed. (ugly but more effective than adding all the signals in fe-recode and doing it there)
Replaced SERVER_REC by IRC_SERVER_REC in dcc-chat.c since it's belongs to IRC(makes the compiler happy again).

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4034 dbcabf3a-b0e7-0310-adc4-f8d773084564
2005-10-10 18:32:32 +00:00
Wouter Coekaerts
e159d8b2f0 Fix memleak in dcc get, by Toby Peterson (Bug 214)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3716 dbcabf3a-b0e7-0310-adc4-f8d773084564
2005-03-06 18:47:05 +00:00
Timo Sirainen
af4bcb70f2 Passive DCC support by Francesco Fracassi (francesco.f at openssl.it)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3236 dbcabf3a-b0e7-0310-adc4-f8d773084564
2004-03-23 22:06:41 +00:00
Timo Sirainen
65463924d2 Added DCC SERVER support by Mark Trumbull
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3127 dbcabf3a-b0e7-0310-adc4-f8d773084564
2003-10-01 16:02:43 +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
55c2e7a066 /SET dcc_file_create_mode wasn't used. Also print strerror() message if
creation fails.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2949 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-10-14 15:26:26 +00:00
Timo Sirainen
eddc3d90c6 net_ip2host() and net_host2ip() now treat any IPv6 IPs as 0.0.0.0, if IPv6
support isn't enabled in irssi. Also DCC's human readable IP address is
taken from DCC SEND request directly with IPv6.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2825 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-05-26 16:52:36 +00:00
Timo Sirainen
0a02833d0e fallback to rename() if link() isn't supported on the filesystem, so people
can still download files to such FSes..


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2625 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-03-17 00:59:46 +00:00
Timo Sirainen
64e98b7f4a Correctly handle DCC GET write() failures.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2427 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-02-10 18:42:23 +00:00
Timo Sirainen
d6abc84ab5 Connection tag variable wasn't deinitialized, so when destroying a DCC
record it might have stopped a wrong timeout/io func (or probably not,
because new source func was allocated soon after, and it'd have the same tag
which would just be free'd twice).


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2324 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-20 02:18:37 +00:00
Timo Sirainen
103d668974 When creating a file for DCC download, make sure we won't run into any race
conditions if /SET dcc_download_path was set to some directory where other
users could write files as well. Also, the created file mode is always 0600
now.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2318 dbcabf3a-b0e7-0310-adc4-f8d773084564
2002-01-17 22:51:28 +00:00
Timo Sirainen
e6f006009f /SET dcc_own_ip now affects also which interface irssi uses to connect to
outgoing DCC connections.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2150 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-11-25 17:35:47 +00:00
Timo Sirainen
f354fe54c7 Moved some stuff from irc to core. Added command_bind_proto() function to
bind protocol-specific commands. Added #define command_bind_irc() for easier
access. CMD_IRC_SERVER(server) check should be done at the beginning of each
command requiring IRC server as active server, it handles it correctly the
cases when it is not. Did some other cleanups as well.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1955 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-11-02 01:05:14 +00:00
Timo Sirainen
4c7b07ed3f IPv6 fixes. Everything now keeps both v4 and v6 addresses in memory and
at connect() time it's decided which one should be used.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1334 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-03-04 01:47:13 +00:00
Timo Sirainen
19dff227d8 Removed /SET dcc_block_size and /SET dcc_fast_send - fast send is now
always used and dcc_block_size is useless with it.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1250 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-19 03:40:06 +00:00
Timo Sirainen
e4f7d55ce9 DCC cleanups - split DCC_REC to CHAT|GET|SEND_DCC_RECs. Plugins should
now be able to add whatever new DCC types.

Nick changes affect DCC chats. /WHOIS without parameters works properly
in DCC CHAT queries.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1194 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-10 02:02:26 +00:00
Timo Sirainen
6ad5d24e0d DCC RESUME, DCC ACCEPT: we might have crashed with invalid parameters.
Some other "cleanups".


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1178 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-02-03 17:38:01 +00:00
Timo Sirainen
ce6e5a12f9 DCC cleanups - half rewrite. New features: file names with spaces work
properly, you can have multiple dcc chats with same people (or more
useful, same nick in different ircnets), /DCC CHAT|GET|RESUME with no
arguments accepts the last request, notifies if dcc request was sent to
channel, warns about connecting to lowports, /SET dcc_autoget_lowports
specifies if autogetting should work with lowports, complains of
invalid dcc ctcps instead of ignoring. And fixed /SET dcc_autorename
OFF which didn't work before.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1135 dbcabf3a-b0e7-0310-adc4-f8d773084564
2001-01-18 02:30:59 +00:00