Commit Graph

21 Enmetoj

Author SHA1 Message Date
Jaidyn Ann fbe6e66743 Change class names 2021-06-20 12:44:20 -05:00
Jaidyn Ann fdeb533d6e Sorting of RosterWindow by accounts 2021-06-18 18:42:10 -05:00
Jaidyn Ann 7d72b5152c Add '/help' command 2021-06-15 00:48:00 -05:00
Jaidyn Ann 46d6d0a0b0 Basic command storage and parsing
A new class was added (ChatCommand) to represent commands, which are
all stored in the Server iself.

A command can be assigned any arbitrary BMessage, and can be given
arguments with some semantic meaning (so far just "string" or "room
participant," etc).

"invite" and moderation commands were added (ban/kick/mute etc).
2021-06-15 00:22:35 -05:00
Jaidyn Ann 6c43311982 Program-wide avatar cache
Add a program-wide avatar cache― whenever a contact or user's avatar has
changed, it gets cached in ~/config/settings/Caya/Cache/$account/People
(for contacts) or $account/Users (for everyone else).

ImageCache is now used, only for caching the kPersonIcon resource image―
it might be useful later for other commonly used images (status
indicators, etc).

Fixes #4
2021-06-13 17:34:30 -05:00
Jaidyn Ann 07350b3a0a Auto-join cached rooms on log-in
Rooms are now cached in ~/config/settings/Caya/Cache/$account/Rooms/,
with each file representing a seperate room. The filename is used as the
identifier, and these files now also serve as log files. The log
attribute name has also changed from "logs" to "Caya:logs".

When a protocol has succesfuly connected, all cached rooms are
automatically joined.
2021-06-12 21:42:10 -05:00
Jaidyn Ann 7767995400 Use account-based rather than protocol-based cache paths 2021-06-09 11:40:27 -05:00
Jaidyn Ann 503c196d4f Generate unique foreground for each user 2021-06-07 00:56:26 -05:00
Jaidyn Ann dc3fdd65c8 Store chatlogs in binary and text formats
If chat logs are stored in an endless plain-text file, they're going to be a
pain to parse. If they're stored in a binary file, they're a pain for
the user to `grep` or go through manually, but they're easier to parse.

Why not both?

Logs are now stored with a BMessage (with BStringLists) in the 'logs'
attribute, and the plain-text logs in the file itself.

The attribute will only store 20 messages, but the file itself will be
appended to forever.

The logs directory also changed, from ~/config/settings/Caya/Cache/Logs
to ~/config/settings/Caya/Logs.

Useful functions for reading/writing messages to and from an attribute were
borrowed from BePodder's libfunky. :-)
2021-06-06 12:02:26 -05:00
Jaidyn Ann 89905fe23c Show/receive room subjects, show protocol icon in conversation view
The conversation view now displays the protocol icon and room subject.
Messages for receiving room names (IM_ROOM_NAME) and subjects
(IM_ROOM_SUBJECT) were added, and support for the latter was given to
the XMPP add-on.

New message APIs were added, and several (room-related) im_what values were
moved into the 150s/160s.

UserItem::_TintColor() was moved to CayaUtils, because it can be used in
several different contexts.
2021-06-04 13:57:04 -05:00
Jaidyn Ann 385bfbff35 Add text logging of chats
Now chat sessions are logged to ~/config/settings/Caya/Cache/Logs/.
2021-05-24 14:20:57 -05:00
Jaidyn Ann 61a1f0baf1 Allow multiple protocols per add-on
Now an add-on can contain multiple protocols, and the protocol API has
changed. An add-on must now export protocol_count() and protocol_at(),
with the latter replacing protocol(). protocol_count() returning the
amount of protocols in a given add-on, and protocol_at(i) giving a
new CayaProtocol* "at" the given index.

CayaProtocol has also been changed, adding Signature(),
FriendlySignature(), Icon(), Path(), and SetPath(). The reasoning is
that different protocols (even within a single add-on) will have
different signatures and icons, so this data should be accessible from
the protocol itself.

CayaProtocolAddOn now has CountProtocols() and ProtocolAt(i), allowing
the accessing of multiple protocols. A CayaProtocolAddOn can be given a
default protocol index in the constructor, whose protocol will be
returned with Protocol(). Version() was also moved from CayaProtocol to
CayaProtocolAddOn.
2021-05-21 13:47:14 -05:00
Barrett17 8ed06e4de5 IconUtils is now Haiku public API remove it. 2015-06-24 16:23:04 +00:00
barrett 7540f60d24 Resolved a memory leak, removed unuseful commented code, CAYA_EXTENDED_AWAY replaced with CAYA_CUSTOM_STATUS and added CAYA_INVISIBLE. 2012-05-15 17:20:11 +00:00
barrett 710a3c6526 Updated the contacts list BMenuItem with a complete redesign of the item, added an experimental version of the Search BTextControl showing a text that disappear when the user click on it, updated the Nickname text control to be a BTextView, other minor updates already WIP like more organization of statuses. 2012-05-15 16:48:53 +00:00
plfiorini 98dd89fb55 Update copyright year. 2011-12-03 22:38:03 +00:00
plfiorini 88c5eedc9b Some style violations fixed. 2010-05-20 21:31:55 +00:00
plfiorini affca15f8b Added utility functions to get account paths. 2010-05-09 09:38:30 +00:00
plfiorini 2e8cd94f8c * Now using a grid layout.
* Implemented the "wrench" menu (it needs an icon).
2010-05-09 08:23:53 +00:00
plfiorini 4b01bd22bb Moved RescaleBitmap() utility function to BitmapUtils.{cpp,h}. 2010-05-08 16:21:36 +00:00
plfiorini 0bf4b59922 Usual SVN tree (branches, tags, trunk). 2010-05-07 09:47:10 +00:00