Commit graph

2059 commits

Author SHA1 Message Date
mathieui
7a485ef4d0 Add a common.safeJID function, and use it everywhere 2012-08-06 15:38:09 +02:00
mathieui
a14141bcec Make optparse work 2012-08-06 15:07:38 +02:00
mathieui
100994df28 Add a fallback to optparse if argparse is not found 2012-08-06 15:01:39 +02:00
mathieui
5692a0278b Should fix most tracebacks due to the new sleek version
(sleekxmpp added JID validation, which means that JID(something) now
raises an exception if the jid is invalid, instead of failing silently and
having JID('') as a default)
2012-08-05 21:06:13 +02:00
mathieui
8c0b3f8ae5 Add a filter_info_messages option
- This option takes a list of words separated by colons
- All the messages containing those words will not be shown
2012-08-05 13:08:06 +02:00
mathieui
ec5bb3b213 Use the revision/date for the poezio version if a .git is found 2012-08-05 02:04:52 +02:00
mathieui
d723cec5eb Move from optparse (deprecated) to argparse 2012-08-05 01:50:05 +02:00
mathieui
7826511abb Do not set last activity when sending a stanza because it makes no sense 2012-08-03 17:34:39 +02:00
mathieui
0b8211fe28 Fix a traceback due to a missing '%' 2012-08-02 16:32:59 +02:00
mathieui
a66714ac8e Documentation update 2012-08-02 16:28:22 +02:00
mathieui
3897d131c1 Implement XEP-0012 (last activity) ; Fixes #1870
- Add a /activity command
- Load xep_0012 on start
- Add a 'l' shortcut in the roster to get the last activity
- Using "/activity" in a direct conversation will add a message in the
  conversation, and not in the info buffer.
2012-08-02 16:24:10 +02:00
mathieui
1d908702b1 Update the XEP support page 2012-08-02 01:31:44 +02:00
mathieui
18074c3c23 Add simple communication blocking (Fixes #1837)
- Add /block, /unblock, and /list_blocks commands
- Enable the commands only if the server advertises the feature
- http://xmpp.org/extensions/xep-0191.html#example-9 was not tested, but
  should work (could not find a server to test with)
- Add documentation for the commands
2012-08-02 01:09:10 +02:00
mathieui
0cb39b32a4 Do not generate invalid jids (e.g. localpart@domainpart/)
This is in prevision of a sleekxmpp update with JID validation.
Also, comment the “server” option in the config file a bit better.
2012-08-01 20:10:00 +02:00
mathieui
f76e80c5fa Sort resources from highest priority to lowest
- Previously it was from lowest to highest
- Add the “Priority:” info to the “i” key in the roster
2012-08-01 15:45:10 +02:00
mathieui
9905646184 Various changes to the roster sorting
- Change the separator from _ to :
- Move the functions away in another module to avoir cluttering the
  roster code
- Add a case-sensitive sort (“sname”)
2012-08-01 14:42:02 +02:00
mathieui
c890fefbc4 Add an "online" contact sorting method
- put the online contacts at the beginning of the list
- allows, e.g. jid_reverse_online_reverse, to put offline contacts at
  the start of the group, in alphabetical order
2012-08-01 01:36:18 +02:00
mathieui
47c593ddaf Sort the unavailable contacts at the end of the contact list 2012-08-01 01:24:42 +02:00
mathieui
71f813af28 Add a roster_group_sort option, which works like roster_sort
- defaults to "name" (sort by group name)
- document it
- also, micro-optimize get_nb_connected_contacts()
2012-08-01 01:06:57 +02:00
mathieui
1625a4f41f Add a roster_sort option to sort the contacts inside the roster groups
- defaults to jid_show (which means that they are sorted into sub-groups
  by show and are sorted by JID inside those)
- See the default config file or the documentation for details
2012-07-31 23:40:53 +02:00
mathieui
4096e7f427 Also sort the contacts alphabetically
Contacts are first sorted alphabetically, and then sorted again
depending on their show; since the python sorts are stable, the order
will remain and the sub-groups (corresponding to one show type) will be
sorted alphabetically too.
2012-07-31 21:12:59 +02:00
mathieui
4a7f6c5eaf Sort the contacts in the roster groups by show (xa/away/…) 2012-07-31 20:51:18 +02:00
mathieui
ee97ba6b6c Make the autorejoin option work with bans, too, and fix the documentation 2012-07-31 13:38:53 +02:00
Florent Le Coz
906c74f0be Use pipes.quote instead of a string.replace in the link plugin. 2012-07-30 23:56:48 +02:00
mathieui
88d32a7bc4 Add an autorejoin_delay option
- document it
- works in per-tab config too
2012-07-30 19:05:20 +02:00
mathieui
ec7dd75012 /bind with only one argument now resets the binding 2012-07-29 19:45:46 +02:00
mathieui
e7837355d1 Documentation: contributing help & guidelines 2012-07-29 19:29:20 +02:00
Florent Le Coz
21eeef5c7b Implement the sending of underlined text in xhtml-im messages (C-c u).
Note that a portion of text can NOT have a color AND be underlined at the
same time, but it's not really tragic (see comment in source code).
2012-07-29 03:36:05 +02:00
Florent Le Coz
c9ea00b963 Fix get_conversation_by_jid when a string is passed. 2012-07-27 16:07:27 +02:00
Florent Le Coz
0f7b680c12 Fix two typos in the theme documentation. 2012-07-27 16:02:01 +02:00
mathieui
85d77e2da4 -an 2012-07-26 18:52:23 +02:00
mathieui
74d9459cfb Add an overview of the poezio internals to the documentation 2012-07-26 18:32:25 +02:00
mathieui
8a0a100bf5 Add a /self command 2012-07-26 14:15:11 +02:00
mathieui
1c29b39a6e Add a /runkey command
This allows the user to run the action defined on a key without having
to press that key. The completion completes all the available keys that
will have an effect.
2012-07-26 12:57:42 +02:00
mathieui
d8623d1c50 Change how scrolling is done
- All functions involved return a boolean, and the core function use
  that value to determine if a refresh is needed or not. (avoids useless
  refreshs)

- Scrolling with PGUP/DOWN on the roster now only does _one_ action, an
  not a range corresponding to the screen size (should be way faster)
2012-07-26 12:40:08 +02:00
mathieui
c4fcf3c71a Remove the duplicate function get_tab_of_conversation_with_jid
- get_conversation_by_jid() now behaves like the removed name
2012-07-26 12:35:49 +02:00
mathieui
721367e8f7 Refactor core.py to have meaningful sections
- Put the commands and the related completions together
- Put the xmpp handlers together
- Put the curses-using functions together
2012-07-26 00:47:06 +02:00
mathieui
2767da0b78 Small non-impacting modifications
- Write the config with “option = value” instead of “option= value”
- Docstring for sighup_handler
- Optimize a join() in the main loop
- Rename the verbose get_error_message_from_error_stanza() with
    get_error_message()
- Remove the unused Tab.just_before_refresh() which is litterally used
  nowhere in poezio
2012-07-26 00:09:23 +02:00
mathieui
b7b7d6b3aa Remove the need for hg and the dnspython fork
(upstream works, now)
2012-07-24 18:10:46 +02:00
mathieui
82e242305d Remove the shell_completion
- completion is normal with no way to change it
(shell_completion was buggy)
- remove it in the default config and in the doc too
2012-07-19 02:09:24 +02:00
mathieui
0de6a197f6 Fix /info (role and affiliation were inverted) 2012-07-19 02:05:43 +02:00
Florent Le Coz
082067afe9 [labedz] Add keys to jump to the next and previous contact in the roster. 2012-07-18 22:30:08 +02:00
mathieui
8317b845d8 Fix /version to find a fulljid when available
And improve the completion in the roster (go to the resources)
2012-07-17 21:56:04 +02:00
mathieui
9322835659 Finally fix the ipv6 issues.
- with reattempt = True & max_attempts = 0
2012-07-13 02:22:25 +02:00
Florent Le Coz
66d9ddbefd Add the replace plugin to the index. 2012-07-07 05:12:48 +02:00
Florent Le Coz
5745a3e8f0 typo or something like that… 2012-07-07 04:56:38 +02:00
Florent Le Coz
8739662e31 Add a replace plugin. 2012-07-07 04:52:20 +02:00
mathieui
ab14923611 Prevent tracebacks in the mpd_client plugin
Do not traceback when:
    - The song has no album
    - the song has no title
    - the song has no artist
    - the playlist is empty
    - mpd is not playing
2012-07-07 04:39:01 +02:00
Florent Le Coz
d47c31a587 Properly quote the %(body)s and %(from)s used in the simple_notify plugin. 2012-07-05 00:50:47 +02:00
mathieui
73b8addafe Use no_auth instead of failed_auth event
With failed_auth, poezio was showing an error message for each
authentication mechanism tried (3, usually). This commit fixes that.
2012-07-04 00:37:34 +02:00