Commit graph

3128 commits

Author SHA1 Message Date
mathieui
069283e349 Don’t escape backslashes unless we are inside a quoted string and the next char is a quote
Sadly, we can’t doctest stuff with backslashes because it drives doctest
crazy.
2014-04-28 00:20:57 +02:00
mathieui
31716565a7 Provide our own wrapper for checking the host category (ref #2511?)
xmpp.plugin['xep_0030'].has_identity appears to be unreliable at best,
so we provide our own.

Might help the case of carbons not displayed.
2014-04-27 22:38:24 +02:00
mathieui
3fb3d8db3d Fix memleaks in pooptmodule.cut_text (ref #1914)
- we need to decrement the refcount after giving the tuple to the
  retlist in order to transfer ownership

The example script below will quickly take gigabytes of ram with the
old module, while the new will not take noticeably more memory.

The leak is not very visible on launch, because we “only” leaked each
tuple returned, and (int, int) is not heavy. However, after weeks of
use and many messages, the memory still isn’t freed and it shows.

import poopt
import gc

a = 'coucouco ' * 1000
for i in range(100000):
    if not (i % 10000):
        print(i)
    poopt.cut_text(a, 50)
2014-04-27 21:38:29 +02:00
mathieui
5999b71c41 Fix #2106 (implement message delivery receipts)
- two options request/ack_message_receipts
- two new theme parameters : CHAR_ACK_RECEIVED and COLOR_CHAR_ACK
- if a message has a receipt, the character is displayed between the
  timestamp and the nick, using the color
2014-04-27 16:32:03 +02:00
mathieui
60224bb76a Fix weird behavior while using the input in the muclisttab 2014-04-27 02:17:00 +02:00
mathieui
3cb2c8351a Fix a resize issue when vertical tab list options are set from the roster 2014-04-27 01:59:02 +02:00
mathieui
fea4f95de9 80-columns wrap for MucTab and fix some completions
- fix the /version completion with spaces
- fix the /unignore completion with spaces
2014-04-26 23:49:52 +02:00
mathieui
0d5d36465c Document /recolor random with /help too 2014-04-26 14:41:19 +02:00
mathieui
4172a79117 Fix #2514 (add a /toggle command) 2014-04-26 14:27:02 +02:00
mathieui
1f0ff4f0c3 Fix #2444 (implement room destroy)
- destroy the current room if no parameter
- destroy the room given as a parameter if any
- no reason or alt room because it would be ambiguous in a command
  (implementation ideas welcome)
2014-04-26 14:05:28 +02:00
mathieui
4c4e2083a6 Fix the nickname of server-generated messages 2014-04-26 11:50:00 +02:00
mathieui
947cd13107 Disable 0198 for now because we will properly implement it later 2014-04-26 11:49:11 +02:00
mathieui
4a26dea66d Fix #2516 (display error with carbons)
- fix the bug where messages from our own jid were incorrectly displayed
- the nick is now fixed for the whole conversation
2014-04-25 20:48:40 +02:00
mathieui
b85a3d1c8e Update CHANGELOG 2014-04-25 20:13:43 +02:00
mathieui
98914b8b0a Fix a traceback when sorting a listwin 2014-04-24 23:39:12 +02:00
mathieui
1bd9f78fe6 Improve src/theming.py (print the colors and do not pollute the terminal) 2014-04-24 21:26:13 +02:00
mathieui
828f60fcb8 Update the themes dir during execution, and not at module level 2014-04-24 21:25:31 +02:00
mathieui
5012611bd7 Make keyboard.py a bit nicer to use 2014-04-24 21:13:31 +02:00
mathieui
4de2dfc72b Fix a bug in the config._parse_file function (traceback when parsing empty files) 2014-04-24 21:12:48 +02:00
mathieui
1349f297f5 Documentation update
remove a duplicate section, typos & stuff
2014-04-24 21:12:26 +02:00
mathieui
4fec08879e Documentation update
- add some formatting and links (also, typos)
- link the Theme class from the theming page
2014-04-23 21:34:05 +02:00
mathieui
3bfe93824c Wrap yet another curses operation with a lock 2014-04-23 20:05:51 +02:00
mathieui
efa6b4254d Fix #2450 (redraw top-scrolled tabs properly after resize) 2014-04-23 20:05:02 +02:00
mathieui
2b63e76ef9 Update the alias plugin
- use the new PluginConfig.remove method to remove aliases
- do not do weird stuff when no args are provided
- do not flood when re-creating stored aliases
2014-04-22 20:21:00 +02:00
mathieui
e6ce1ce7b6 Map Config.remove_and_save to PluginConfig.remove 2014-04-22 20:17:19 +02:00
mathieui
b01d94294a Add a way to remove options from the config file
(still surgically, without touching comments or anything else)
2014-04-22 20:16:27 +02:00
mathieui
3415619895 80-columns wrapping and some docstrings
also bump version, and add some gettext wraps
2014-04-22 20:02:07 +02:00
mathieui
b14aceaa4f Close the file descriptor of the fifo on closing
(also, it indeed needs to be a thread because opening
a fifo for reading is a blocking operation)
2014-04-22 19:57:25 +02:00
mathieui
266ab8e10d Split the config.write_in_file method to be more modular and cleaner
Will also allow a remove_in_file or whatever to remove options instead
of blanking them.
2014-04-21 23:46:12 +02:00
mathieui
d66aa8cf66 Log exit from signals to the error log
(SIGTERM, SIGHUP, and SIGPIPE for now)
2014-04-20 17:47:16 +02:00
mathieui
93594b8453 Do not reload unaliased aliases
TODO: implement the remove_option method from configparser
2014-04-20 17:35:16 +02:00
mathieui
3622443631 Keep a file descriptor reading the fifo instead of just opening and closing it
should take care of the sigpipe when no one is reading it anymore due to
broken connection
2014-04-19 06:36:10 +02:00
mathieui
0401029854 Same formatting changes in core.commands 2014-04-18 23:10:12 +02:00
mathieui
2879d3c694 Mostly line-wrap at 80 chars and add docstrings
- also fix some erroneous comment(s)
- remove self.background which wasn’t set to something other than false
- fix the chatroom address (and the doc) in the first help message
2014-04-18 19:41:20 +02:00
mathieui
28d928999d Fix #2297 (crash after resize)
wrap some curses calls with try/except block
2014-04-18 19:18:48 +02:00
mathieui
dc08adf605 Do not lock on the “composing” chat state with otr
might send too many stanzas when send_chat_states is false, but I don’t
care.
2014-04-17 20:39:01 +02:00
mathieui
71ae73ca7b Log part messages and show a leave message on /cycle 2014-04-17 00:02:19 +02:00
mathieui
214904f199 Change the formatting of join/part messages
also remove some hardcoded stuff
2014-04-16 23:07:00 +02:00
mathieui
a511d5a84d Document the create_gaps option
and sets the default value to false, to keep coherent with the code.
2014-04-15 23:05:33 +02:00
mathieui
a784216196 Fix #2440 (highlight composing tabs)
- add a show_composing_tabs option, default value: "direct"
- todo: find a nice different color for this
2014-04-15 22:57:44 +02:00
mathieui
80ebe9edc0 Fix the color of the message with /part
(it now uses the theme)
2014-04-14 22:59:40 +02:00
mathieui
3221534b0f Implement XEP-0249 (Direct MUC Invitations)
- fallback to mediated invitations if only the bare jid is given to the
  command or if the jid does not advertise support

TODO: provide a way to send passwords
2014-04-14 22:32:34 +02:00
mathieui
245f5f050c Fix #2422 (traceback in input) (also #2431)
now the scroll is made with 1/3 of the input size every time instead of
fixed offsets
2014-04-14 20:56:05 +02:00
mathieui
b884e6d6e2 Fix #2339 (put the more “important” users at the bottom in the userlist when configured)
(one-line fix, and the others are for reformatting imports to be consistent)
2014-04-14 19:51:56 +02:00
mathieui
e3859c2862 Do not load a plugin if its init() traceback
and show a somehow helpful error message in this case
2014-04-13 23:13:18 +02:00
mathieui
9c2203e7e3 Do not show the plugin unload on exit 2014-04-13 22:39:49 +02:00
mathieui
f809dffd8e Remove module-level code from the plugin manager as well 2014-04-13 22:38:25 +02:00
mathieui
165ee9ee1a Fix #2503/4 (use “.” as an alias for the current tab in /move_tab) 2014-04-12 02:59:49 +02:00
mathieui
f58dfe26af Only highlight the nick if it is not inside a word
thanks gio
2014-04-12 00:34:25 +02:00
mathieui
04aa6c8914 Fix #2428 (complete fulljids on /version in MUCs)
also clean up some newlines mess
2014-04-11 01:25:00 +02:00