Diogo Sousa
6c8d9c2194
Merge pull request #675 from orium/server-time-plugins
...
Server time plugins
2013-07-14 11:29:24 -07:00
Diogo Sousa
3598966069
Forgot to add hexchat_emit_print_attrs() to the macros in hexchat-plugins.h.
2013-07-13 16:50:51 +01:00
Diogo Sousa
ec6f5b011a
g_free() should be used for g_malloc().
2013-07-13 05:33:16 +01:00
Diogo Sousa
9978ebd853
Removed outdated comment.
2013-07-12 22:52:12 +01:00
Diogo Sousa
18eaccb840
Added functions to create/destroy event_attrs to plugin interface.
...
Function names were chosen to keep consistency with the rest of the
API.
2013-07-12 22:46:04 +01:00
Diogo Sousa
e0fb3d537d
Added hexchat_emit_print_attrs() to plugin interface.
2013-07-12 01:33:35 +01:00
Diogo Sousa
5e240eb259
Indentation fixes and code cleanup.
2013-07-10 00:42:34 +01:00
Diogo Sousa
7101b7b864
Now hexchat_hook_server_attrs() and hexchat_hook_print_attrs() is called
...
when it should. This should close #661 .
2013-07-09 23:11:28 +01:00
Diogo Sousa
98aa62f637
Removed two dummy functions in plugin interface.
2013-07-09 22:04:07 +01:00
Diogo Sousa
798db7368a
Added hexchat_hook_server_attrs() and hexchat_hook_print_attrs() to the plugin
...
interface. This hooks are similar to hexchat_hook_{server,print}() except the
callback passes an extra argument with the (new) structure hexchat_event_attrs.
This structure contains attributes related to the event; by now it only contains
the server_time_utc member which is non-zero if server-time is enabled and the
server used this extension to pass a timestamp.
See issue #661 .
(Note: this hooks are still not called by hexchat in this commit.)
2013-07-09 20:21:16 +01:00
Diogo Sousa
4cc03aba75
Now fe_get_{int,str}() sets transient for the main window.
...
This allows window managers to handle the window in a better way, for instance
xmonad used to open the dialogs in a new tile and now opens a simple float.
2013-07-03 19:48:45 +01:00
Diogo Sousa
4b40597c76
Fixed get_timezone() to work on windows.
2013-07-02 02:22:41 +01:00
Diogo Sousa
9a789bc9e7
Now handle_message_tag_time() doesn't use "timezone" since it is not defined
...
in *BSD.
2013-07-02 01:54:18 +01:00
Diogo Sousa
4886cc8258
Don't use G_VALUE_INIT since it was introduced in glib 2.30, and our minimum
...
requirement is glib 2.28. This was giving a compilation error in FreeBSD 9.1,
since it uses glib 2.28.
2013-07-02 01:54:11 +01:00
Diogo Sousa
73c9321361
Fixed server-time timestamps issue regarding local time.
2013-06-30 15:00:38 +01:00
Diogo Sousa
25288120be
Fixed another bug in handle_message_tag_time(): tm_mon is between 0 and 11.
2013-06-28 23:42:11 +01:00
Diogo Sousa
d99d951f7f
Fixed bug in handle_message_tag_time().
2013-06-28 22:08:35 +01:00
Diogo Sousa
059cbcd406
Fixed compilation error in VS.
2013-06-28 16:29:39 +01:00
Diogo Sousa
dcdb11a78b
Added preferences options to enable the server-time extension when available.
...
(Internationalization messages missing.)
2013-06-28 16:15:15 +01:00
Diogo Sousa
aef9e3922e
Fixed a few null pointer derefs caused by dummy code that somehow I
...
forgot about.
2013-06-28 16:08:03 +01:00
Diogo Sousa
ce6fef3d0a
A few messages missing regarding server-time.
2013-06-28 16:07:42 +01:00
Diogo Sousa
4057b7dd58
Now inbound_cap_ls() can enable extensions when a bouncer uses a namespace for
...
the extension server-time.
2013-06-28 16:07:24 +01:00
Diogo Sousa
d1725e3f44
server-time for all numerical messages.
2013-06-28 16:04:32 +01:00
Diogo Sousa
42da8fe3ef
server-time supported in all named servermsg: ping, error, notice and
...
authenticate.
The only thing left to do for server-time are the numeric messages.
2013-06-28 16:04:16 +01:00
Diogo Sousa
a01bd83c64
Organized cap inbound code in inbound.c instead of proto-irc.c.
2013-06-28 16:04:06 +01:00
Diogo Sousa
6a0240aa18
server-time supported in most named messages.
2013-06-28 16:03:37 +01:00
Diogo Sousa
179747a7bc
Implemented handle_message_tag_time() for time-server messages.
2013-06-28 16:03:20 +01:00
Diogo Sousa
94186f7888
First step towards message tags extension support
...
(see http://ircv3.atheme.org/specification/message-tags-3.2 ).
In particular this commit implements a (very) dummy implementation
sketch of the server-time extension
(see http://ircv3.atheme.org/specification/message-tags-3.2 and #499 ).
2013-06-28 16:03:12 +01:00
Diogo Sousa
6e3f05fcc7
Fixed indent: spaces -> tabs.
2013-06-20 19:03:26 +01:00
Diogo Sousa
02139fbb79
Handle IPv6 addresses correcly in fe_open_url_locale().
2013-06-19 00:15:47 +01:00
Diogo Sousa
9ef1d1db96
Now WORD_HOST6 is handled the same way as WORD_HOST.
2013-06-18 23:30:38 +01: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
Diogo Sousa
88e9611444
Minor cosmetic changes
2013-06-08 03:14:24 +01:00
Diogo Sousa
97e88b885a
Renamed tbuf to buf in create_mask() to avoid confusion.
2013-06-08 03:01:36 +01:00
Diogo Sousa
f84476cf87
Fixed possible overflow in create_mask().
2013-06-08 02:56:36 +01:00
Diogo Sousa
473ab16739
Now the default configuration tries to set the language from the system
...
locale, and defaults to english if no language match.
This closes #473 .
2013-06-08 02:34:01 +01:00
Diogo Sousa
d934e60c2b
Improved server_get_network(): if we don't have the current network in the
...
network list use the server name in received in event 005.
(This fixes the problem that the network (%n) in the log file names would be
"NETWORK" instead of the real network name (this happened if the network was
not in the network list).)
2013-05-25 22:31:45 +01:00
Diogo Sousa
fffe9f4bd9
Restored inbound.c to make the pull request cleaner.
2013-05-24 22:04:34 +01:00
Diogo Sousa
7353bf2698
Followed richtroye suggestion and implemented the net == NULL guard in
...
servlist_favchan_find().
2013-05-24 21:49:46 +01:00
Diogo Sousa
133b0f7d94
Fixed null pointer deref when we try to autojoin a channel of a network not
...
in the network list.
2013-05-24 20:29:15 +01:00
Diogo Sousa
4402ea34de
Fixed mistake in last commit.
2013-05-24 16:46:35 +01:00
Diogo Sousa
faa53a5335
Spell check dictionaries were not being updated when changed.
2013-05-24 00:01:25 +01:00
Diogo Sousa
d3ce4f64f6
Passing a password to the /server command was ignored because the login method
...
was not set.
2013-05-23 13:22:34 +01:00
Diogo Sousa
89078eb3b3
Fix an issue where the lag meter would be stuck after a reconnect caused by a
...
ping timeout.
2013-05-16 15:11:52 +01:00
Diogo Sousa
d9d05e83ba
Restructured a fair bit of cfgfiles.c. Besides making the code cleaner this allows
...
for better error handling (in fact the error message of check_prefs_dir () whould
make hexchat abort).
2013-05-13 01:58:08 +01:00
Diogo Sousa
61ed0829bd
Forget to put an empty line after a function definition
2013-05-12 23:33:44 +01:00
Diogo Sousa
f023de0faf
Removed unnecessary call to check_prefs_dir() in load_config().
...
This function is called in save_config(), where it is actually needed.
2013-05-12 23:25:36 +01:00
Diogo Sousa
7238853f0f
Factored locale related code in main() to a new function.
2013-05-12 23:15:23 +01:00
Diogo Sousa
6a8cad6f94
Now hexchat doesn't abnormally terminal when started as root.
...
This fixes #589/#504.
2013-05-12 16:37:38 +01:00
Diogo Sousa
cf59ad2c76
Now process_numeric() passes the right session context to text_emit() when an
...
numeric event occurs regarding a nick with a open dialog.
Since this session context is potentially passed to plugins this can change the
behavior of plugins, but I think this is the intended semantics
(http://docs.hexchat.org/en/latest/script_python.html#context-theory ).
Another consequence is that event messages will be displayed in the query dialog
of the nick in question (if a query dialog is open, of course), which I think is
sensible. (The initial intention of this patch was actually to report the
"No such nick" message in the query dialog when sending a message to a user that
has quit.)
2013-05-09 20:32:05 +01:00
Diogo Sousa
36694afe0e
Don't send ping's to the server if we are still waiting for a pong.
...
If the server don't respond in 30s just report the lag as +30s.
This fixes the bug where hexchat reset the lag meter every time a ping
was sent and no pong was received.
2013-04-09 19:14:46 -07:00