aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
Commit message (Collapse)AuthorAgeLines
* Send new away message when message changesShane Synan2016-03-20-1/+8
| | | | | | | | Send new away message when away-notify is enabled and the status changes (e.g. "Away" to "Mobile") or the status message changes without returning from away. Fixes IRC clients with away-notify persisting old away messages.
* Don't send 301 RPL_AWAY when talking to contacts through &bitlbeedequis2016-03-20-1/+2
| | | | | | Fixes trac ticket 865 ("Make bitlbee send "is away" and such status messages via &bitlbee channel instead of separate query window"), except that the solution is to not send them at all.
* Add imcb_buddy_nick_change(), like nick_hint but strongerdequis2016-03-20-25/+15
| | | | | | | nick_hint only works when creating new users, it's a no-op after the user is online. This new function takes care of nick changes after that. It also helps clean up couple of hacks in irc_im.c \o/
* Send away-notify after join/part from IRC channelShane Synan2016-02-04-6/+6
| | | | | | | Move irc_send_away_notify below bee_irc_channel_update to delay sending the updated away-notify status until after any nicks have joined/quit. Otherwise, some IRC clients will drop the status messages as they go to nicks that the client doesn't know about.
* Add 'log' UI function, to avoid direct calls to irc_rootmsg from nogaimdequis2015-12-01-0/+9
| | | | | Just a trivial wrapper over irc_rootmsg(), but will help me to slightly reduce the ugliness of an unavoidably ugly hack for libpurple.
* bee_irc_user_new: Use str_reject_chars to sanitize both user and hostdequis2015-11-27-3/+3
| | | | | | | Fixes trac ticket 1195: https://bugs.bitlbee.org/bitlbee/ticket/1195 I had no idea how to reproduce that bug until I tried with libpurple. The built-in jabber never had this problem.
* irc: Send numeric error when failing to join a channeldequis2015-11-26-1/+6
| | | | | | | | | | | | | This fixes issues like getting a blank window with a channel that the irc client thinks the user is in but bitlbee doesn't. The error is sent either by returning NULL in the chat_join prpl function, or by calling imcb_chat_free() before the user is added to the channel. This wasn't possible before since purple returned NULL in its chat_join, which resulted in other bugs too. Since that's fixed, I can finally apply this, which has been in my stash for a very long while.
* IRCv3 away-notify capabilitydequis2015-11-20-0/+6
| | | | | | | | | | | Neat lightweight notifications of the awayness of contacts. In practice, this means weechat/hexchat users can see away people in their nick list and change show_users to 'online,special,away' to avoid the mode spam completely. These are also sent on online/offline changes, since offline_user_quits can be turned off, and you'd need something when they come back.
* IRC self-message support (messages sent by yourself from other clients)dequis2015-10-30-8/+46
| | | | | | | | | | | | | | | | | | | | | | This adds an OPT_SELFMESSAGE flag that can be passed to imcb_buddy_msg() or imcb_chat_msg() to indicate that the protocol knows that the message being sent is a self message. This needs to be explicit since the old behavior is to silently drop these messages, which also removed server echoes. This commit doesn't break API/ABI, the flags parameters that were added are all internal (between protocols and UI code) On the irc protocol side, the situation isn't very nice, since some clients put these messages in the wrong window. Irssi, hexchat and mirc get this wrong. Irssi 0.8.18 has a fix for it, and the others have scripts to patch it. But meanwhile, there's a "self_messages" global setting that lets users disable this, or get them as normal messages / notices with a "->" prefix, which loosely imitates the workaround used by the ZNC "privmsg_prefix" module.
* Fix use-after-free when leaving invited (temporary) channelsdequis2015-10-08-2/+5
| | | | | | | | | Trac ticket 1229, https://bugs.bitlbee.org/bitlbee/ticket/1229 This one is complicated. See the trac ticket for details. Relevant commits: cc20520 6963230 664bac3 - second one fixed the same issue, third one reverted it, this one takes a different approach.
* Pass 'reason' values around in imcb_chat_remove_buddy/chat_remove_userdequis2015-08-08-2/+2
|
* Restore old autojoin logic and a hopefully better fix for the problemWilmer van der Gaast2015-07-29-1/+2
| | | | jgeboski was trying to solve. #1221 for details.
* More coverity fixes!dequis2015-05-07-1/+3
| | | | | | | | | | CID 18634: 'Logically dead code' in jabber_get_info CID 18638: 'Dereference after null check' in oauth2_access_token_done CID 18691: 'Copy into fixed size buffer' in bee_irc_user_new CID 20274: Leak in bee_irc_chat_invite CID 20297, CID 20283: Leaks in crypt_main Some the base64 leaks there weren't detected, needs modeling.
* irc: split bee_irc_chat_name_hint in a few functionsdequis2015-04-06-55/+1
| | | | Also split underscore_dedupe from nick_dedupe.
* chat_name_hint: normalize utf8 with fallback from the channel nameAntoine Pietri2015-03-25-3/+9
|
* Fix a bunch of memory leaksdequis2015-03-22-2/+5
| | | | | | | | | | | | | | | | | | | - irc_im.c: - bee_irc_user_msg: strdup leaks when otr swallows messages - bee_irc_user_action_response: GString leak in all ctcp replies - otr.c: - call g_slist_free() on the list of the otr_policy setting - otr_filter_msg_in: call otrl_tlv_free() if "tlvs" are returned - otr_filter_msg_out: don't g_strdup() if the message should be ignored - log_otr_message: g_strdup_vprintf() leaks always - nogaim.c: - imcb_ask_auth/imcb_ask_add: leaks in g_strdup_printf() - imcb_ask_add leaks imcb_ask_cb_data if the user already exists - add imcb_ask_cb_free() to correctly free its data - msn_util.c: add msn_buddy_ask_free(), ditto - storage_xml.c: pass_cr/password if base64_decode or arc_decode fail - ssl_gnutls.c: conn->hostname leak in error conditions, like invalid certs - jabber_util.c: jabber_buddy_by_ext_jid() leaks jid if it's not an ext jid
* Reindent everything to K&R style with tabsIndent2015-02-20-625/+618
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* irc_commands: implemented KICK supportjgeboski2015-01-29-0/+18
| | | | | | | | | | | With similar commands being supported, such as INVITE, the KICK command should be supported as well. The key motivation behind supporting KICK is having for having a way to remove users from group chats. As of now, there is no way for a bitlbee user to remove a user from a group chat. With no current KICK implementation, it made using this command a prime candidate for the UI side of this implementation. In addition, the KICK command has been supported in the control channel as well. This is to keep the INVITE/KICK pair consistent.
* irc-channel: implemented a special mode for show_usersjgeboski2015-01-28-1/+3
| | | | | | | | | | | | | This allows for users to be declared as being special, which does not have any specific meaning. The meaning of being special is different from protocol-to-protocol, which many protocols do not even implement. This functionality is mainly geared towards a special user state which only some protocols may actually need to define. For example, with the third-party Steam plugin, this can be used for denoting a user which is actively playing a game. By default, this mode will not actually be used by any plugin. However, it does default to the half-operator user mode.
* irc-im: fixed invalid memory reading on chat leavejgeboski2015-01-16-3/+1
| | | | | | | | When a chat is left, prpl->chat_leave() is invoked, which is suppose to free the groupchat. Since the data is now freed, or suppose to have been freed, attempting to modify the data will result in bad things. This simply removes an assignment operation, which was unneeded due to the memory already being freed.
* Replace isdigit/isalpha/.../tolower/toupper with glib variantsdequis2015-01-16-2/+2
| | | | | | | | | | | This fixes warnings about passing signed chars to them (apparently they are implemented as macros that do array lookups without checks in some platforms, yay) Specifically: functions=isalnum|isalpha|isdigit|isspace|isxdigit|tolower|toupper sed -ir "s/$functions/g_ascii_&/g" **/*.c
* Fix incorrect Free Software Foundation addressMatej Cepl2015-01-16-2/+2
|
* Fix word_wrap memory leak...dequis2014-09-21-0/+1
|
* Word wrapping for group chat mesages (Ticket #1131)dequis2014-02-27-2/+3
|
* Use account tag instead of protocol/network name for generating hostmasks.Wilmer van der Gaast2013-07-01-1/+11
|
* Add irc_t* argument to all relevant nick_*() functions.Wilmer van der Gaast2013-04-20-1/+1
|
* I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-1/+1
| | | | | | | my copyright mentions since some were getting pretty stale. Left files not touched since before 2012 alone so that this change doesn't touch almost EVERY source file.
* Bug #929: Indeed SET_NULL_OK was missing.Wilmer van der Gaast2012-03-10-1/+6
|
* Mainline merge.Wilmer van der Gaast2011-12-17-16/+7
|\
| * Big merge from pesco, closing some OTR issues: #759, #824, #839, #830.Wilmer van der Gaast2011-10-20-16/+7
| |\
| | * rename irc_usermsg to irc_rootmsg.unknown2011-10-03-23/+11
| | | | | | | | | | | | | | | | | | add new irc_usermsg, irc_usernotice. deliver user-specific messages from libotr as notices to that user.
| | * factor making a message appear from a specific nick out of bee_irc_user_msgunknown2011-10-01-14/+21
| |/
* / Error handling fixes.Wilmer van der Gaast2011-08-04-3/+5
|/ | | | | | Found one double free() bug causing troubles when a buddy_msg() handler takes down the IM connection immediately.
* Crash-bug (NULL-ptr deref) fix in channel part routine.Wilmer van der Gaast2011-06-11-1/+2
|
* Improved channel cleanup. Should fix a crash bug when leaving temporaryWilmer van der Gaast2011-05-01-0/+3
| | | | | groupchat channels (i.e. channels invited to on gtalk). #780.
* Add CTCP HELP code. Also cleaning up some noop handlers in the TwitterWilmer van der Gaast2010-12-07-0/+20
| | | | | | module (chat_with and send_typing) that suggested support for features that obviously don't exist.
* First bits of CTCP support to contacts. (Try /CTCP VERSION on a JabberWilmer van der Gaast2010-12-06-0/+26
| | | | | contact.)
* rename -delWilmer van der Gaast2010-12-05-0/+18
|
* Clean up pastebuf_timer when cleaning up channels, and properly clean upWilmer van der Gaast2010-12-02-1/+4
| | | | | | | channel-chatroom reference when leaving a chatroom. This fixes two very similar crash bugs when leaving a chatroom within the paste_buffer_delay period.
* Chop spaces from IM handles in all cases. Fixes #723.Wilmer van der Gaast2010-11-21-11/+7
|
* Added irc_channel_with_user() function to find a suitable channel to showWilmer van der Gaast2010-11-20-2/+7
| | | | | a user's message in, instead of just &bitlbee by default.
* Merging mainline, which includes a huge msnp13 merge.Wilmer van der Gaast2010-10-02-3/+3
|\ | | | | | | | | | | Not 100% sure about the OpenSSL merge, should double check that but I'm currently offline.
| * Fix NULL pointer dereference when removing nicks from groupchats.Wilmer van der Gaast2010-09-06-1/+1
| |
| * Fixing handling of (Jabber) chatroom topic changes done by the user.Wilmer van der Gaast2010-09-05-1/+1
| |
| * Fixed NULL ptr dereference when hilighting non-IM users in chatrooms.Wilmer van der Gaast2010-09-02-1/+1
| |
* | Do encryption and decryption. Somehow SMP and other things aren't workingWilmer van der Gaast2010-09-01-13/+73
|/ | | | | | so well yet, at least when testing with Pidgin on the other side. Not sure where the bug is.
* Revert to the old control channel messages for fullname changes, the /noticesWilmer van der Gaast2010-08-30-1/+3
| | | | | were probably just a bad idea.
* Process incoming XMPP groupchat invites in a saner way: Create a temporaryWilmer van der Gaast2010-08-23-0/+58
| | | | | channel the user can easily /join.
* blist should only show contacts that are (or would be if they were online)Wilmer van der Gaast2010-08-14-14/+2
| | | | | in the current channel.
* Restore default_target setting, kill last_root_cmd variable and just useWilmer van der Gaast2010-07-29-0/+1
| | | | | the last_channel variable, like for any other user.