aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
Commit message (Collapse)AuthorAgeLines
* Move canohost functions (diff licence) to separate file.Wilmer van der Gaast2017-04-06-102/+1
|
* Remove ip6_*wrap() functions which are no longer needed.Wilmer van der Gaast2017-04-06-45/+0
|
* Add reverse_lookup() function which does a more proper (verified) DNSWilmer van der Gaast2017-04-06-0/+101
| | | | | reverse lookup. (Code copied from OpenSSH instead of redoing it poorly.)
* word_wrap: truncate utf8 safelydequis2016-11-12-3/+9
|
* misc: Add str_pad_and_truncate() helper functiondequis2016-10-17-0/+26
| | | | Useful for tables. See following commit.
* misc.c: Add a str_reject_chars function, use it in otr_filter_colorsdequis2015-11-27-0/+16
|
* Replace <br/> and <br /> with \n in strip_htmlAndré Glüpker2015-10-08-0/+4
|
* typofix - https://github.com/vlajos/misspell_fixerVeres Lajos2015-08-07-1/+1
|
* Move twitter_parse_id() to parse_int64() in misc.cdequis2015-05-30-0/+16
|
* get_rfc822_header: allow headers at the end of a stringdequis2015-04-10-5/+0
|
* Reindent everything to K&R style with tabsIndent2015-02-20-338/+354
| | | | | | | 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.
* random_bytes: Use /dev/urandom only, don't bother trying /dev/randomdequis2015-01-26-59/+10
| | | | | | Also abort() if there's no /dev/urandom See http://www.2uo.de/myths-about-urandom/ for details.
* Fix UTF8 nick truncation issuesdequis2015-01-16-0/+9
| | | | | | | | | | | | | | When nicks exceeded the length limit, they were cut at 24 bytes and that sometimes left invalid utf8 at the end, which made the nick_ok() validation fail and often broke those nicks completely. This adds a truncate_utf8 function to cut the string at a safe place Also, the method to deduplicate nicks when there's no more place to add underscores was changed to add "_XX" at the end, where XX are two random hex chars. The previous method in those cases was increasing the value of the first character of the nick... which leads to silly and confusing results (i.e. FacebookUser -> GacebookUser)
* Replace isdigit/isalpha/.../tolower/toupper with glib variantsdequis2015-01-16-4/+4
| | | | | | | | | | | 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
|
* RIP native win32 support (use cygwin instead)dequis2014-09-27-2/+0
| | | | It has been broken for a very long time and nobody cared about it.
* srv_lookup: Portability fixes, handle compressed responsesjcopenha2014-07-24-17/+10
| | | | | | | | | | srv_lookup works on cygwin and openbsd now. Provide ns_initparse, friends, and types where they aren't provided by platform. Use dn_expandname instead of custom parser so compressed DNS responses are handled correctly.
* Add limit param to split_command_parts(), fix twitter quotes bugdequis2014-07-24-2/+7
| | | | Only took me a few months to write. I even added a test case.
* I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-2/+2
| | | | | | | 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.
* Solve a whole bunch of Twitter module crashes: Twitter responses seem toWilmer van der Gaast2012-09-22-2/+2
| | | | | | be getting truncated sometimes. Treat this as an error in http_client already instead of returning partial data.
* NULL-checking in rfc822_get_header() and OAuth response handling.Wilmer van der Gaast2011-12-20-1/+4
|
* Moving msn_findheader() to lib/misc.c as get_rfc822_header() so I can use itWilmer van der Gaast2011-12-19-0/+52
| | | | | in OAuth as well. (Need it to find the Content-Type: header.)
* Fixed use of g_iconv() in do_iconv(). This was done wrong for ages andWilmer van der Gaast2011-07-02-4/+4
| | | | | | apparently screwed up charset handling in OSCAR pretty badly.. Found and fixed by dalias (#813). May or may not also fix other bugs.
* Merging mainline, which includes a huge msnp13 merge.Wilmer van der Gaast2010-10-02-5/+2
|\ | | | | | | | | | | Not 100% sure about the OpenSSL merge, should double check that but I'm currently offline.
| * Merge mainline stuff.Wilmer van der Gaast2010-08-14-30/+50
| |\
| * \ Merging msn-offline branch. A tiny bit of MSNP13, and it works for the firstWilmer van der Gaast2010-08-08-5/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | minute of the session (after that the MSN server finds out the rest of BitlBee still speaks MSNP8).
| | * | Use local memory in http_encode() instead of malloc().Wilmer van der Gaast2010-08-08-5/+2
| | | |
* | | | First step in this merge. Mostly a bzr merge and then a cleanup of conflictsWilmer van der Gaast2010-08-24-1/+11
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | and parts I want to/have to redo (because of ui-fix).
| * | | merge in bitlbee headSven Moritz Hallberg2010-06-04-3/+2
| |\ \ \
| * \ \ \ merge in bitlbee 1.2.7Sven Moritz Hallberg2010-06-03-2/+1
| |\ \ \ \
| * \ \ \ \ merge in bitlbee 1.2.6Sven Moritz Hallberg2010-06-03-0/+35
| |\ \ \ \ \
| * \ \ \ \ \ merge in bitlbee 1.2.5Sven Moritz Hallberg2010-06-03-1/+3
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | |
| * | | | | | merge in latest trunkSven Moritz Hallberg2008-07-17-25/+39
| |\ \ \ \ \ \
| * | | | | | | interpret &apos;Sven Moritz Hallberg2008-02-14-0/+1
| | | | | | | |
| * | | | | | | - add support for setting ops/voice according to OTR msgstateSven Moritz Hallberg2008-02-09-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add 'otr trust' user command - support non-otr messages during keygen - run otr messages through strip_html - interpret <b> and <i> tags in html messages - record max message size in prpl - add 'encrypted' flag to user_t - cosmetics
* | | | | | | | When doing SRV lookups, return an array with all RRs instead of just theWilmer van der Gaast2010-08-10-30/+50
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first one. The first isn't always the best one and this is currently causing GTalk issues when talk2.l.google.com (which is currently dead) is first.
* | | | | | | Add commands to the Twitter module, starting with undo (which deletesWilmer van der Gaast2010-08-07-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | either your most recent tweet, or a specific id (pass it as an argument)).
* | | | | | | Fixing http_encode(): BitlBee now calls setlocale() (for nicknameWilmer van der Gaast2010-07-29-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transliteration to work), which changes the behaviour of isalpha() (turns out it's not a simple macro). For HTTP-encoding, this sucks, especially when doing OAuth (which is very picky about the way HTTP encoding is done). This should fix problems some people were seeing with posting Twitter messages containing accents.
* | | | | | | Merging head.Wilmer van der Gaast2010-06-01-3/+2
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | |
| * | | | | | Setting the HTML flag on a connection has a nasty side effect of escapingWilmer van der Gaast2010-05-19-3/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a lot of "special" characters, and these HTML entities are not counted as one character. :-( So just strip HTML of incoming stuff and don't do anything with what goes out. It's not required. The story may actually be more complicated this, let's find out.
* | | | | | Mainline merge.Wilmer van der Gaast2010-05-03-2/+1
|\| | | | |
| * | | | | Make http_encode() RFC3986-compliant. (Escape everything except alphanumericWilmer van der Gaast2010-04-25-2/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | characters plus [-_~.].)
* | | | | Merging loads of stuff from mainline.Wilmer van der Gaast2010-04-14-0/+35
|\| | | |
| * | | | Added a mktime_utc() to misc.c using code that used to be in jabber_util.c.Wilmer van der Gaast2010-04-08-0/+35
| | |_|/ | |/| | | | | | | | | | | | | | I want to use this in the Twitter module.
* | | | Restored CTCP/DCC hooks for outgoing file transfers.Wilmer van der Gaast2010-04-13-1/+4
| | | |
* | | | Start handling CTCPs, in a saner way than before.Wilmer van der Gaast2010-04-12-0/+45
|/ / /
* | | Adding a few consts and other misc fixes from bug #431. Doing this via aWilmer van der Gaast2010-03-14-1/+2
|\ \ \ | | | | | | | | | | | | | | | | merge because bzr can probably deal with the conflicts better than patch.
| * | | Some const/etc cleanups submitted by domen@coderock.org back in bug #431.Wilmer van der Gaast2010-03-14-1/+2
| | |/ | |/|
* | | Added &apos; HTML entity since we're sure getting that one a lot withWilmer van der Gaast2010-03-08-0/+1
| | | | | | | | | | | | | | | libpurple..
* | | Shuffling a few more #includes. Much more shuffling will be needed.Wilmer van der Gaast2009-10-23-0/+1
|/ /