Commit Graph

69 Commits

Author SHA1 Message Date
TingPing c4cb1b25ec Fixup: Detect urls with unicode symbols
missed one in 77ecaa6093
2014-12-28 00:40:51 -05:00
TingPing 77ecaa6093 Detect urls with unicode symbols
Fixes #1250
2014-12-28 00:29:58 -05:00
Arnavion ec7a0d6e13 Fixed some more signed-unsigned-comparison warnings. 2014-12-15 10:25:28 -08:00
Arnavion c1831cb19d Minor tidying up 2014-12-08 21:24:59 -08:00
Campbell Barton f83d78dd28 Warning cleanup
- ignoring const
- declarations after statements
- some C files didnt include own headers (risking them getting out of sync)

Closes #1064
2014-11-02 14:41:20 -05:00
TingPing 80bdd9ce11 Detect utf8 urls
They might not be valid, but like many things they are still used
2014-09-07 19:51:59 -04:00
LightningW d1b9118056 Fix DOMAIN and EMAIL patterns.
Closes #1107
2014-09-01 17:55:22 -04:00
Jahan Addison 120a5a1dcd Match nick last when checking url
Closes #796
2013-10-23 06:32:57 -04:00
Diogo Sousa 6d3c176ff8 url_check_line () now recognizes all urls
previously it only recognized url with "://" after the scheme.
Urls without a scheme are purposely not recognized by this function.

Fixes #701
Closes #815
2013-10-22 13:28:03 -04:00
Diogo Sousa a25363f5c3 make_re() now doesn't free the argument.
This is good practice and also helped simplifying re_*() functions.
2013-10-22 13:26:30 -04:00
TingPing 04dbcdffc0 Only underline the channel part if nick prefix 2013-09-23 15:10:00 -04:00
TingPing 0146a38faa Fix url detection of channel with nick prefix
Closes #769
2013-09-23 14:58:11 -04:00
Farow 73d63ca3da Allow multiple channels in url, fix nick re
- Multiple channels have to be separated by a comma
- Fix #nick becoming a url for nick instead of #nick
2013-08-13 07:39:34 +03:00
Farow 4f77f046d0 Channel url and cursor fix
- Allow colons in channel urls
- Only add the channel part in the context menu
- Fix cursor not changing between separator and url
2013-08-13 04:19:14 +03:00
Diogo Sousa 61c9ad08bf Fixed memory leak. 2013-08-02 02:45:54 +01:00
Diogo Sousa 6ec7bfad30 Indentation fix. 2013-08-01 16:39:49 +01:00
Diogo Sousa 0e76283c9a Now nickname and channel matching is server aware: we only match words that
have the prefixes the server uses.

The url regex matching was designed to be more versatile. This was needed to
disambiguate matches between nicks and channels, since they may have common
prefixes now (&+!). In case of ambiguity, when the server supports prefixes that
are common to both channels and nicknames, we choose the nickname (the nickname
only matches if there is a user with that nick in the current session).

Fixes #655.
2013-08-01 16:28:17 +01:00
Anton Backer bca972bdc3 Permit dot-less domain names
Fixes #523
2013-07-19 09:01:53 -04:00
TingPing d8286a63ec Add more uri schemes 2013-06-19 18:57:52 -03:00
TingPing 9854b100fb Detect Spotify URIs 2013-06-19 05:07:45 -04:00
Diogo Sousa d88c4ad411 Added a few more useful url schemes. 2013-06-18 12:32:55 +01:00
Diogo Sousa 8b217981ed Removed unused argument of make_re(). 2013-06-18 12:07:46 +01:00
Diogo Sousa 8ce8a359c1 Now url_check_word() returns WORD_HOST6 when a ipv6 address is matched. 2013-06-18 12:01:39 +01:00
Diogo Sousa 55734baed8 Fix IPv6 addr matching in url: must be enclosed in []. 2013-06-17 22:43:18 +01:00
Diogo Sousa e4b6f4b375 Refined IPv6 address matching in url.c. 2013-06-16 20:16:58 +01:00
Diogo Sousa 32dee82c58 Added support for passwords in userinfo of urls. 2013-06-16 20:00:35 +01:00
Diogo Sousa 2870586cf9 Fixed irc:// and ircs:// url matching: irc://freenode was not working because
"freenode" doesn't match a hostname.
2013-06-16 19:11:26 +01:00
Diogo Sousa cb1975f450 Fixed file:// url matching. 2013-06-16 19:09:50 +01:00
Diogo Sousa 805b33552b Rework url matching to make it easier to add schemes.
The new way allows great control of what a url is composed of.

Added a bunch of new schemes.
2013-06-16 15:36:52 +01:00
Diogo Sousa 6bc05a8bc8 Improved host matching in url:
* Refined ipv4 addr
 * Added ipv6 addr
2013-06-16 04:22:28 +01:00
RichardHitt e17a9c6503 In do_an_re() put WORD_CHANNEL before WORD_HOST. fixes #440 2013-04-19 12:41:49 -07:00
RichardHitt 6b86940b7b Allow nick starting with digit despite rfc 2812 violation 2013-04-06 11:51:22 -07:00
RichardHitt 3fee94473b Don't clobber data, just adjust url endpoint 2013-03-31 12:14:52 -07:00
RichardHitt 503968c1fd Strip all \r and \n, not just a single \r. 2013-03-29 13:11:17 -07:00
TingPing b5f78f484d Fix relative paths on windows 2013-03-11 13:55:29 -03:00
RichardHitt 8e3d039199 Fix bug in url.c at re_host().
Unlike the other re_foo() functions it was not checking immediately
and returning if host_ret had already been filled in.  This would
causes a memory leak since the previous GRegex would be lost.
2013-02-13 12:52:49 -08:00
TingPing ce31c6dce6 only detect full paths on windows.
closes #302
2013-01-31 23:58:18 -05:00
TingPing 8b451edf9c Merge pull request #377 from RichardHitt/issue376
Parse url according to rfc 1738: add separate define for TLD.  Closes 376.
2013-01-16 14:06:50 -08:00
RichardHitt 7bc0e017f6 Oops. didn't get the DOMAIN slight change last time. Here it is now. 2013-01-15 13:26:11 -08:00
RichardHitt bb617ccacd Prev called anything a URL! Reverted but slight DOMAIN change. 2013-01-15 13:19:29 -08:00
RichardHitt d5fbea3411 Fix DOMAIN and TLD per rfc 1738, thanks Arnavion 2013-01-15 01:23:37 -08:00
RichardHitt be2d100d2d Parse url according to rfc 1738: add separate define for TLD. 2013-01-14 12:33:08 -08:00
RichardHitt 07b69fd2f8 Oops, Windows doesn't offer strndup(). Use g_strndup(). 2013-01-11 16:12:52 -08:00
RichardHitt 487ac0a011 Correct nick recognition. Closes 372. 2013-01-11 01:39:21 -08:00
Richard Hitt ccc82895ed Merge branch 'master' of http://github.com/RichardHitt/hexchat 2013-01-08 12:58:05 -08:00
Richard Hitt 5ec9d8534e Add "ircs://" to the list of URL schemes 2013-01-08 12:55:20 -08:00
RichardHitt 4bf2fbe092 Ywes, nicks can be as short as one character long! 2013-01-03 14:24:04 -08:00
RichardHitt 44d920592d For NICK0 use NICKSPE, not NICKDIG 2013-01-03 14:13:20 -08:00
RichardHitt f4c2c08ccb Also allow URLs of of the form \.[a-z]+\/ 2013-01-02 23:47:58 -08:00
RichardHitt 270a31535c I forgot to add case WORD_PATH to do_an_url()'s switch statement 2013-01-02 15:03:16 -08:00