jajcus / cjc Goto Github PK
View Code? Open in Web Editor NEWConsole Jabber Client
License: GNU General Public License v2.0
Console Jabber Client
License: GNU General Public License v2.0
It seems that more timestamp formats should be provided in order to allow users fluent migration from file logs to sqlite db archive.
Format that helped me to import my chats and messages was this (including the trailing space):
"%a %d %b %Y %I:%M:%S %p "
when a line exceeding the screen width appears on the roster, the next line dissapears to be shown again after a window swap/^L.
--- muc.py.bak 2006-10-03 20:22:05.000000000 +0200
+++ muc.py 2006-10-05 13:43:33.000000000 +0200
@@ -309,6 +309,7 @@
def cmd_who(self, args):
nicks = ','.join(self.room_state.users.keys())
self.buffer.append(nicks)
self.buffer.append('\n')
self.buffer.update()
The roster should sort, an minimum with alphabetical ordering, ideally taking the status into account (free for chat, online, away, xa, dnd, offline in that order.) There could probably be a "roster.sort" setting to pick which kind of ordering to use.
The comments from [http://www.jabberstudio.org/ JabberStudio]:
Date: Sep 05, 2004 at 02:08 pm CDT
User: jajcus
Comment: Alphabetical sorting (group first, than name/jid) is already done.
Date: Mar 01, 2006 at 01:41 pm CST
User: weirdo
Comment: it would be nice to able to toggle sorting by a visible nick, rather than a jid.
Cjc has no ability to display priorities assocjated with resource. it would be much better if list has -verbose trigger or something like that that allow to display priorities for each resource
especially when one tries to find which resource will get message by default.
Reported by mail:
przy okazji, lacze sie do google i oni zmieniaja jid przy polaczeniu
(czy cos takiego)
{{{
[23:42] Connecting:
[23:42] Resolving SRV for 'xmpp-client' on u'DOMAIN'...
[23:42] Resolving 'talk.l.google.com.'...
[23:42] Connecting to 209.85.229.125:5222...
[23:42] Connected to 209.85.229.125:5222.
[23:42] Doing TLS handshake with DOMAIN.
[23:42] Last known peer certificate loaded from:
/home/bif/.cjc/known_certs/DOMAIN.der
Certificate verification error: 'Certificate subject name doesn't
match server name' ignored - peer certificate is known as trustworthy.
[23:42] Encrypted connection to DOMAIN established using TLSv1/SSLv3,
DHE-RSA-AES256-SHA (256 bits)
[23:42] Binding to resource unix...
[23:42] Authorized as USER@DOMAIN/unix38893DF6.
[23:42] Got roster
}}}
w kazdym razie mam w rosterze:
{{{
me:
USER@DOMAIN/unix [online]
USER@DOMAIN/unix38893DF6 [online]
}}}
daloby sie to deduplikowac? :) (low priority, nie przejmuj sie za bardzo)
I installed pyxmpp 1.0 in my /usr/local
then installed cjc 1.0 in samme /usr/local
it installed sucessfully.
But when i ran cjc the follwing exception was generated :
Traceback (most recent call last):
File "/usr/local/bin/cjc", line 13, in
from cjc import main
File "/usr/local/share/cjc/cjc/main.py", line 36, in
import pyxmpp.all
File "/usr/local/lib/python2.5/site-packages/pyxmpp/all.py", line 33, in
from pyxmpp.stream import Stream
File "/usr/local/lib/python2.5/site-packages/pyxmpp/stream.py", line 29, in
from pyxmpp.streambase import StreamBase
File "/usr/local/lib/python2.5/site-packages/pyxmpp/streambase.py", line 47, in
from pyxmpp import resolver
File "/usr/local/lib/python2.5/site-packages/pyxmpp/resolver.py", line 30, in
import dns.resolver
ImportError: No module named dns.resolver
Tell me if any other module is required too ?
PyXMPP no longer contains a module "exceptions". The TLSError that required the import at line 38 of main.py and is used at line 1389 has been moved to pyxmpp.streamtls.
Removing the import and doing s/exceptions/streamtls/ on the other line fixes the problem.
add support for multiple accounts
The comments from [http://www.jabberstudio.org/ JabberStudio]:
Date: Sep 05, 2004 at 02:05 pm CDT
User: jajcus
Comment: CJC is supposed to be single protocol, single account client. To use several accounts you will need several CJC instances running. However, I plan to make some mechanizm to synchronize such separate sessions so they may feel like one client.
use muc nick instead room name while chat with muc user
After MUC configuration cjc not refresh status line.
Example:
/join ...
Just a test, sorry.
It would be helpful to have an option similar to /set timestamps in irssi, which allows the timestamps in chats and status messages to be turned off. They are still logged, but are not displayed in the window. The option could default to true and show the timestamps or be set to false to hide them. Or it could be something like hide_timestamps which could default to false.
I installed pyxmpp 1.0 in my /usr/local
then installed cjc 1.0 in samme /usr/local
it installed sucessfully.
But when i ran cjc the follwing exception was generated :
Traceback (most recent call last):
File "/usr/local/bin/cjc", line 13, in
from cjc import main
File "/usr/local/share/cjc/cjc/main.py", line 36, in
import pyxmpp.all
File "/usr/local/lib/python2.5/site-packages/pyxmpp/all.py", line 33, in
from pyxmpp.stream import Stream
File "/usr/local/lib/python2.5/site-packages/pyxmpp/stream.py", line 29, in
from pyxmpp.streambase import StreamBase
File "/usr/local/lib/python2.5/site-packages/pyxmpp/streambase.py", line 47, in
from pyxmpp import resolver
File "/usr/local/lib/python2.5/site-packages/pyxmpp/resolver.py", line 30, in
import dns.resolver
ImportError: No module named dns.resolver
typing /chat jajcus five times will open five queries with jajcus, instead of moving to jajcus' query window after four latter commands. ouch! :-)
Hy :-D I just installed cjc yesterday and really like it - but I was looking for an OTR-plugin for it but couldn't find anything :-(
Is there perhaps already an existing one ? Or if not, I'd like to request this feature :D I would be very happy about it :)
in irssi, after sending a command like '/bin/sh foo', it is treated as a text line, because the first param before a space has two '/'s in it. might help a bit with pasting.
also, typing '/ /foo bar' produces 'unknown command: foo'. would be nice to treat that as a raw '/foo bar' message :-)
type '111222333' on your input line, position your cursor between '1' and '2'. press ^W. 111's will be deleted, but the cursor'll be positioned between '2' and '3'. it should be at the beginning of the input line
/{online,xa,offline,whatever} -to need a jid, won't fallback to a roster item
It would be helpful to have a command to change the account password on the server. For now, this must be done using the rawxml or xml_console. Instructions for doing this are on jabber.org, but a command to do it automatically would be easier.
default.conf and/or .cjc must not be group/world accessible which they are by default after /save
when the inputline is longer than one screen, there is an arrow (or a comma, if the terminal is not fully capable). however, after ^U (inputbar flush), the arrow is still there.
Typing notifications as described in JEP-0022 -> http://www.jabber.org/jeps/jep-0022.html
The comments from [http://www.jabberstudio.org/ JabberStudio]:
Date: Sep 05, 2004 at 02:15 pm CDT
User: jajcus
Comment: There is a new JEP-0085 which is supposed to supersede JEP-22 and seems much better, but it is still experimental. When the JEP is ready it will probably be implemented in CJC.
However, JEP-22 is alredy widely used and working fine, so implementing it in CJC sounds like a good idea anyway.
Date: Nov 04, 2004 at 02:02 pm CST
Email: [email protected]
Comment: Have you looked into this?
It doesn't seem too hard to implement.
There is NO console client which supports this yet, this feauture would be unique.
How about adding off-the-record messaging to CJC? This would be a very nice and important feature.
More info at http://www.cypherpunks.ca/otr/ and http://en.wikipedia.org/wiki/Off-the-Record_Messaging
I intend to write plugin, that notify cjc events to status bar of window manager wmii. For now, I hack plugins/events.py with some success, but more elegant solution is to write separate plugin, that launch action for events. But - I'm not python guru, and there is no documentation about writing cjc plugins, or - more general - about cjc api.
[10:55] Presence error from: [email protected]: Service is not available
[10:55] Exception:
Traceback (most recent call last):
File "/home/users/agaran/cjc/cjc/main.py", line 331, in send_event
h(event,arg)
File "/home/users/agaran/cjc/plugins/roster.py", line 107, in ev_presence_changed
self.update_item(arg)
File "/home/users/agaran/cjc/plugins/roster.py", line 136, in update_item
self.write_item(None,item)
File "/home/users/agaran/cjc/plugins/roster.py", line 244, in write_item
self.buffer.insert_themed((group,params["jid"]),"roster.unavailable",params)
File "/home/users/agaran/cjc/cjc/ui/list_buffer.py", line 128, in insert_themed
for attr,s in cjc_globals.theme_manager.format_string(format,params):
File "/home/users/agaran/cjc/cjc/themes.py", line 280, in format_string
return self.do_format_string(format,"default",params)
File "/home/users/agaran/cjc/cjc/themes.py", line 342, in do_format_string
ret+=self.do_format_string(next,next_attr,params)
File "/home/users/agaran/cjc/cjc/themes.py", line 331, in do_format_string
s=self.substitute(format,params)
File "/home/users/agaran/cjc/cjc/themes.py", line 358, in substitute
format=self.process_format_param(format,key,params)
File "/home/users/agaran/cjc/cjc/themes.py", line 489, in process_format_param
err=pr.get_error()
File "/home/users/agaran/cjc/pyxmpp/pyxmpp/stanza.py", line 221, in get_error
raise ProtocolError, (None, "This stanza contains no error: %r" % (self.serialize(),))
ProtocolError: This stanza contains no error: '-10'
[10:55] Event handler failed
i jeszcze taki drobiazg:
mam nieustawione haslo, ladnie przy wlaczeniu pyta o nie, cacy --
chyba ze podam zle haslo, to mam:
[20:15] Encrypted connection to XXXXX established using
TLSv1/SSLv3, AES256-SHA (256 bits)
w statusie mam "offline", ale jak zrobie /connect, to dostaje
[20:15] Already connectedmusze zrobic /disconnect
[20:17] Disconnecting...
[20:17] Stream error: Not authorized
[20:17] Disconnected(dopiero tutaj "stream error: not authorized??")
i dopiero teraz /connect normalnie zadziala
[root@cytadela CJC]# LC_ALL=C TZ=UTC0 diff -Naur cjc_old cjc
diff -Naur cjc_old/cjc/ui/choice_input.py cjc/cjc/ui/choice_input.py
--- cjc_old/cjc/ui/choice_input.py 2009-09-06 12:25:39.000000000 +0000
+++ cjc/cjc/ui/choice_input.py 2009-09-06 12:49:34.000000000 +0000
@@ -75,10 +75,10 @@
cjc_globals.screen.lock.release()
def _keypressed(self,c,escape):
if c>255 or c<0:
c1=ord(c)
if c1>255 or c1<0:
cjc_globals.screen.beep()
return
c=chr(c)
if self.is_printable(c):
self.key_char(c)
else:
@@ -140,7 +140,6 @@
cjc_globals.screen.lock.release()
def key_char(self,c):
c=unicode(c,cjc_globals.screen.encoding,"replace")
if not self.string_choice and c in self.single_choice:
return self.answer(c)
if self.pos>=self.w-len(self.prompt)-2:
diff -Naur cjc_old/cjc/ui/input_widget.py cjc/cjc/ui/input_widget.py
--- cjc_old/cjc/ui/input_widget.py 2009-09-06 12:25:39.000000000 +0000
+++ cjc/cjc/ui/input_widget.py 2009-09-06 12:40:58.000000000 +0000
@@ -60,6 +60,8 @@
cjc_globals.screen.lock.release()
def is_printable(self, unichr):
if type(unichr)==type(""):
unichr=unichr.encode(cjc_globals.screen.encoding,"replace")
category = unicodedata.category(unichr)
if category[0] == "C":
return False
[root@cytadela CJC]#
Howdy,
When logging in to a Jive Wildfire based jabber server, the connection process hangs. The connecting user never gets switched to online presence, and the contact roster is never loaded.
Thanks,
-Will
after adding an alias like '/alias q chat $1', it is not possible to use tab completion in that alias. e.g. /q jaj^I won't cause anything beside a beep, while /chat jaj^I completes to 'jajcus'
When connecting to Google Talk, I receive the following error message:
/var/lib/python-support/python2.4/M2Crypto/SSL/Connection.py:147: DeprecationWarning: Old style callback, use cb_func(ok, store) instead
Then
TLS Error: certificate verify failed
Reported on [http://www.jabberstudio.org/ JabberStudio] on Time Open: Apr 06, 2004 at 11:00 am CDT
If window is not redrawn after resizing, then changing the active
window (esc/alt-1,2,..) produces this error:
{{{
Traceback (most recent call last):
File "/usr/local/share/cjc/cjc/ui/keytable.py", line 340, in keypressed
process_key(ch)
File "/usr/local/share/cjc/cjc/ui/keytable.py", line 306, in process_key
return t.process_key(code,meta)
File "/usr/local/share/cjc/cjc/ui/keytable.py", line 113, in process_key
fun.invoke(self.object,arg)
File "/usr/local/share/cjc/cjc/ui/keytable.py", line 56, in invoke
self.handler(object,arg)
File "/usr/local/share/cjc/cjc/ui/window.py", line 50, in switch_to_buffer
self.set_buffer(b)
File "/usr/local/share/cjc/cjc/ui/window.py", line 137, in set_buffer
self.screen.input_handler.current_buffer_changed(self.buffer)
File "/usr/local/share/cjc/cjc/ui/input.py", line 135, in current_buffer_changed
self.make_windows()
File "/usr/local/share/cjc/cjc/ui/input.py", line 109, in make_windows
self.input_win=curses.newwin(self.h,self.w,self.y,self.x)
error: curses function returned NULL
}}}
Subj. Same with 1.0.0 and r675 from trunk:
sat@thror:/home/sat/bsdevel/ports/net-im/cjc/work/cjc-1.0.0.675# ./cjc.py
Traceback (most recent call last):
File "./cjc.py", line 64, in ?
from cjc import main
File "/usr/home/sat/bsdevel/ports/net-im/cjc/work/cjc-1.0.0.675/cjc/main.py", line 36, in ?
import pyxmpp.all
File "/usr/local/lib/python2.4/site-packages/pyxmpp/all.py", line 33, in ?
from pyxmpp.stream import Stream
File "/usr/local/lib/python2.4/site-packages/pyxmpp/stream.py", line 30, in ?
from pyxmpp.streamtls import StreamTLSMixIn
File "/usr/local/lib/python2.4/site-packages/pyxmpp/streamtls.py", line 37, in ?
from M2Crypto import SSL
File "/usr/local/lib/python2.4/site-packages/M2Crypto/init.py", line 16, in ?
import ASN1
File "/usr/local/lib/python2.4/site-packages/M2Crypto/ASN1.py", line 18, in ?
class ASN1_Integer:
File "/usr/local/lib/python2.4/site-packages/M2Crypto/ASN1.py", line 20, in ASN1_Integer
m2_asn1_integer_free = m2.asn1_integer_free
AttributeError: 'module' object has no attribute 'asn1_integer_free'
Thanks!
while it is possible to use bindings such as KEY_END, which consists of a '^[[8~' sequence, i'm not able to use non-standard (not defined in termcap/terminfo) sequences like '[Oc' (Ctrl+Right under rxvt), which is really good for moving the cursor right word by word (bash's forward-word).
{forward,backward}-word aren't possible either, along with pasting a killed word/character (bash's ^Y).
also, something's wrong with deleting a previous word with ^W: if my input is 'foo bar' and the cursor is positioned on the second 'o', ^W will leave the cursor on 'r', while it should be on the beginning of the line.
CJC lacks user documentation.
First, documenting the "/set" options would be very useful to help people begin with CJC (what is that 'events.event_handlers' for? I guess it could help me, but...). Allowing something like "/help set events.event_handlers" would be great.
Also, sometimes CJC shows a Python exception stacktrace which is totally useless (for example I got one when trying to connect using SSL on xmpp:im.apinc.org).
In [657], plugins/disco.py gives an error when doing /disco ik.nu and then pressing '6'. The problem is at line 174.
I applied this patch to fix it:
{{{
--- plugins/disco.py (revision 657)
+++ plugins/disco.py (working copy)
@@ -172,7 +172,7 @@
node=u""
self.buffer.append_themed("error",
u"Error while discovering information about '%s'%s: %s"
% (jid,node,message))
% (jid.as_unicode(),node,message))
self.ask_question()
self.buffer.update()
}}}
Hi,
When I /chat quser.alpha.qunu.com cjc tells me the address is not found on the roster. That's incorrect, because it actually is, but it also doesn't really matter, because it's a valid jid. So it should just do what 'psi' and others are doing.
(The address is part of qunu.com, an 'ask experts through xmpp' site, which is quite cool. I was trying to write up a page there on how to set up cjc for use with qunu, and noticed this.)
Regards,
Chris Niekel
I think some command wich show current users in a room and their informations like nick, jid, resource would be cool. It could be like the /info in the roster. Maybe I'm wrong and it already exists but I can't find it.
plugin dodajacy cos w rodzaju sekretarki, ktora osobom z poza rostera zadaje pytanie np
jaka jest najmniejsza liczba pierwsza wieksza niz (tutaj losowa liczba nat z przedzialu np 100-300)
i jesli ktos nie odpowie to jest ignorowany a pytanie ponownie zostanie zadane najwczesniej po n godzinach, no i pewnie pytanie i odpowiedz w parze musi byc pamietane chociaz z godzine tak zeby jak ktos odpowie z opoznieniem zeby zarejestrowal i ustawil permit na n godzin
to taki maly filtr przeciwko niezdolnym matematycznie, bo jesli ktos bedzie naprawde chcial to znajdzie kogos kto podpowie...
message encryption and signing with GPG. libgpgme can provide this functionality. Examples of clients with OpenPGP support are Psi and Tkabber.
When I have a long status discription I don't see avtive buffers indicator. It is possible to cut desc a little? Let's say:
![dnd](this is the long and very interesting ...) Active buffers ![]
while the full desc is:
"this is the long and very interesting description I made just a sec ago"
The comments from [http://www.jabberstudio.org/ JabberStudio]:
Date: Apr 27, 2005 at 03:20 pm CDT
User: jajcus
Comment: Cutting the description to fit the status bar is a hard thing to do in current UI code. Maybe moving the status description to the last position of the status bar would be a solution, wouldn't it?
I sometimes get the following traceback when a message is received and I never see the message.
{{{
[20:07] Other error cought
[20:07] Exception:
Traceback (most recent call last):
File "/usr/local/share/cjc/cjc/main.py", line 1382, in stream_loop
act = self.stream.loop_iter(1)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 598, in loop_iter
return self._loop_iter(timeout)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 616, in _loop_iter
self._process()
File "/usr/src/pyxmpp/tests/pyxmpp/streamtls.py", line 178, in _process
StreamBase._process(self)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 637, in _process
self._read()
File "/usr/src/pyxmpp/tests/pyxmpp/streamtls.py", line 173, in _read
StreamBase._read(self)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 661, in _read
self._feed_reader(r)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 677, in _feed_reader
r=self._reader.feed(data)
File "/usr/src/pyxmpp/tests/pyxmpp/xmlextra.py", line 537, in feed
return self.reader.feed(s)
File "/usr/src/pyxmpp/tests/pyxmpp/xmlextra.py", line 57, in _stanza
self.stanza(doc,node)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 401, in stanza
self._process_node(node)
File "/usr/src/pyxmpp/tests/pyxmpp/stream.py", line 107, in _process_node
StreamBase._process_node(self,xmlnode)
File "/usr/src/pyxmpp/tests/pyxmpp/streambase.py", line 710, in _process_node
self.process_stanza(stanza)
File "/usr/src/pyxmpp/tests/pyxmpp/stanzaprocessor.py", line 268, in process_stanza
if self.process_message(stanza):
File "/usr/src/pyxmpp/tests/pyxmpp/stanzaprocessor.py", line 203, in process_message
return self.__try_handlers(self._message_handlers,"normal",stanza)
File "/usr/src/pyxmpp/tests/pyxmpp/stanzaprocessor.py", line 179, in __try_handlers
response = handler(stanza)
File "/usr/local/share/cjc/plugins/message.py", line 558, in message_normal
buff=self.find_or_make(fr,thread)
File "/usr/local/share/cjc/plugins/message.py", line 520, in find_or_make
cjc_globals.screen.display_buffer(buff)
File "/usr/local/share/cjc/cjc/ui/screen.py", line 316, in display_buffer
if buffer.window:
AttributeError: MessageBuffer instance has no attribute 'window'
}}}
This seems to be an intermittent problem which mostly occurs when I receive a message from someone for the first time after connecting to the server. And the problem only seems to occur with messages, not with chats.
A possibly related issue is that setting message.autopopup seems to have no effect. When I do actually receive a message I have to switch to the message window even if message.autopopup is true.
Help for presence.auto_away says: Time in minutes after set presence should be set to 'away' (unset or 0 to disable)
When using /unset presence.auto_away I get loads of this exception:
{{{
[03:00] Exception:
Traceback (most recent call last):
File "//cjc/cjc/main.py", line 331, in send_event
h(event,arg)
File "//cjc/plugins/presence.py", line 159, in ev_idle
auto_away=self.settings["auto_away"]
KeyError: 'auto_away'
[03:00] Event handler failed
}}}
svn version:
Setting presence.auto_away to 0 works fine
When printing a lot of information (I've set the scrollback to 900 lines), and it has started with a very long line (incoming stanza, more than a screenfull), then I can scrollback to the beginning, but once scrolled back, it's not possible to scroll down again.
So, huge line, lots of lines, scroll up to the long line, scroll down -> fails.
None
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.