summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-servers.c
AgeCommit message (Collapse)Author
2015-09-23Add multi-prefix to list of capabilities to requestdequis
Turns out event_names_list() in irc-nicklist.c already handles this. event_who() just ignores it, which is probably a good idea since some of the irc servers I tested this with have a bug that results in sending multiple prefixes in the NAMES reply but not in the WHO one (they were forks of ircd-hybrid before 7.3.0) And NAMES always happens, anyway. WHO is omitted sometimes for huge channels.
2015-09-19Merge remote-tracking branch 'origin' into saslLemonBoy
2015-09-19Add setting to configure rejoin on reconnect behaviourJari Matilainen
Closes #169
2015-09-11SASL supportLemonBoy
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of now. The code gets the values from the keys named sasl_{mechanism,username,password} specified for each chatnet.
2015-09-10Merge pull request #248 from LemonBoy/chantypesAlexander Færøy
Implement CHANTYPES support
2015-08-24Merge pull request #222 from LemonBoy/cap-supportAlexander Færøy
[RFC] CAP support
2015-08-20Send the CAP LS after sending the proxy stringsLemonBoy
Patch by @dequis
2015-06-12Add server check in irc_server_connect (#208)Geert Hauwaerts
Fail instead of crash, if irc_server_connect is called without object. (#208)
2015-05-31Improve ischannel_func (#253)LemonBoy
The function now skips all the leading characters that are in the STATUSMSG. If the server didn't send the STATUSMSG option then it's assumed to be "@+" for compatibility with bahamut 2.4 (sic).
2015-05-15Implement CHANTYPES supportLemonBoy
2015-05-05Implement support for IRCv3.1 CAP negotiationLemonBoy
2015-04-07Change all strcmp() to g_strcmp0() to handle nulls gracefullydequis
Just a string replacement (but i did check every one of them) sed -i 's/strcmp(/g_strcmp0(/g' **/*.c
2014-10-19Try to split long lines on spacesSebastian Thorarensen
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-01Merge pull request #140 from sebth/masterAlexander Færøy
Make line splitting fail-safe
2014-10-01Merge pull request #142 from dequis/away-with-no-reasonAlexander Færøy
irc_server_send_away: don't send empty param if there's no away reason
2014-09-11source cleanup: remove trailing whitespacesMichael Vetter
2014-09-09irc_server_send_away: don't send empty param if there's no away reasondequis
2014-09-01Make line splitting fail-safeSebastian Thorarensen
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-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-06-16Revert "add d,q,f and J to CHANMODES default, to work a bit better with ↵David Leadbeater
dancer and possibly others" This is no longer relevant and most ircds now send a correct isupport message. This reverts commit b832f1f7b2c4a692786d5d52904a2bdf4d14354f.
2014-06-10Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp.David Hill
2009-02-28Add the command send/expire timeout only when needed.Jilles Tjoelker
This was the last always-on <1s timer. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5026 dbcabf3a-b0e7-0310-adc4-f8d773084564
2009-02-08Code Cleanup:Alexander Færøy
Use g_string_append_printf() instead of g_string_sprintfa() (which is considered deprecated.) git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5003 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-22Check server's connected flag rather than net-sendbuffer pointers inEmanuele Giaquinta
sig_server_quit. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4972 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-02Recode outgoing irc quit messages.Emanuele Giaquinta
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4940 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-12-01Factor the code to send an irc action into a function.Emanuele Giaquinta
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4937 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-29Remove obsolete part of comment.Emanuele Giaquinta
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4929 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-12Recode outgoing irc away messages, bug #412.Emanuele Giaquinta
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4901 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-12Export server_send_away and use it in irc-servers-reconnect.c:sig_connectedEmanuele Giaquinta
instead of duplicating the code. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4900 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-10recode.h include fixup.Emanuele Giaquinta
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4892 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-11-09Move recoding of outgoing messages into irc send_message routine. Handlers forEmanuele Giaquinta
message own_{private,public} now receive the message in the client encoding. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4890 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-05-22Extend net_sendbuffer by adding a LINEBUF_REC member and a ↵Emanuele Giaquinta
net_sendbuffer_receive_line function to read linewise from the associated io channel. Rewrite irc/dcc/proxy read logic on top of it. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4841 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-14Replace missed strncasecmp calls with g_ascii_strncasecmp.Emanuele Giaquinta
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4767 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-09Use g_ascii_str{,n}casecmp for case insensitive comparison withEmanuele Giaquinta
ascii only strings. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4739 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-03-07Remove unneeded includes.Emanuele Giaquinta
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4735 dbcabf3a-b0e7-0310-adc4-f8d773084564
2008-02-05Remove unneeded includes.Emanuele Giaquinta
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4709 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-12-23Apply -usermode before -autosendcmd.Jilles Tjoelker
The -usermode is now implicitly treated as a requested usermode change; the MODE command setting it is not redirected. This is good because user MODE may or may not give a reply and this could be confused with the MODE message indicating the initial usermode. Possible issue here: '-' modes in -usermode persist only until you change your umode via /mode. Bug #548 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4668 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-10-12Get -kicks and -msgs from TARGMAX and MAXTARGETS 005 tokens.Jilles Tjoelker
We do not do this for WHOIS because the resulting replies tend to be buggy and inconsistent. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4617 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-06-29If 001 has not been received yet, also treat "Banned" orJilles Tjoelker
"Bad user info" (case insensitive) in an ERROR message as an indication of a server ban. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4571 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-25Pick up host changes on charybdis and ircu servers (396 numeric).Jilles Tjoelker
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4523 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-18Use rfc1459 comparison for nicks by default (it is not a functional changeEmanuele Giaquinta
because irc_nickcmp_ascii is bogusly the same as irc_nickcmp_rfc1459). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4495 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08Oops. Update address correctly now.Wouter Coekaerts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4490 dbcabf3a-b0e7-0310-adc4-f8d773084564
2007-05-08Update FSF addressWouter Coekaerts
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4489 dbcabf3a-b0e7-0310-adc4-f8d773084564