Coder Social home page Coder Social logo

communi / libcommuni Goto Github PK

View Code? Open in Web Editor NEW
84.0 84.0 37.0 5.73 MB

A cross-platform IRC framework for Qt

Home Page: https://communi.github.io

License: BSD 3-Clause "New" or "Revised" License

QMake 2.72% C++ 92.61% C 4.67%
cross-platform irc irc-framework qml qt

libcommuni's Introduction

libcommuni's People

Contributors

amyreese avatar artoka avatar gdamjan avatar hhartz avatar josephcrowell avatar jpnurmi avatar marknotgeorge avatar pajlada avatar plfiorini avatar renatofilho avatar robby- avatar sgielen avatar slysven avatar special avatar thaodan avatar venemo avatar zneix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcommuni's Issues

Full IRCv3 extensions support

http://ircv3.atheme.org/

v3.1 base extensions

  • capability negotiation
  • multi-prefix
  • sasl

v3.1 optional extensions

  • account-notify
  • away-notify
  • extended-join
  • tls

v3.2 base extensions

  • message tags

v3.2 optional extensions

  • server-time (communi-shared/zncmanager)
  • metadata

QDebug stream operators

The QDebug stream operators need to be checked. They are quite broken for at least IrcCommand.

Verify ssl peer certificates

Hello,

Currently the ssl certificate aren't verified. In my opinion you should change this behaviour because only if the peer certificate is verified the connection can be secure. As a first step, the sslsockets verifymode should be changed to QSslSocket::VerifyPeer.

Ideally there should also be a way to specify ca certificates and fingerprints on a per server basis.

State saving and restoring

Add

  • QByteArray IrcConnection::saveState() const
  • bool IrcConnection::restoreState(const QByteArray& state)
  • QByteArray IrcBufferModel::saveState() const
  • bool IrcBufferModel::restoreState(const QByteArray& state)

Nicer command creation in QML

The static IrcCommand::createXxx() convenience API might work fine in C++, but it's clumsy in QML given that one has to create a command instance to be able to call the methods. Perhaps a QML singleton (has to be a different name than IrcCommand to avoid clashes) or extend the Irc API in QML?

var cmd = IrcCommand.part(channel, reason) // clashes with the IrcCommand QML type name
var cmd = Irc.partCommand(channel, reason)

The latter kinda matches with the Qt QML "namespace" but then needs a QML specific documentation...

communiplugin not found

I always have the same error when I try to launch QML and Quick examples :

module "Communi" plugin "communiplugin" not found

I checked and the lib is well installed in the qml directory of Qt installation, but it seems the compiler can't find it. I tested on OSX and Win 8.1 and it's the same. Did I miss something ?

Document IrcNetwork properties

Former IrcSessionInfo getters have been turned to properties in IrcNetwork. They are still documented as mere getters - document then properly as properties.

IrcUserModel went out of sync

After the following events, tijensse was still shown in the user list.

[12:08:51] ! tjenssen (quassel@nat/digia/x-hoeedoqzsfhbayhr) joined #qt-tizen
[12:31:14] ! tjenssen changed nick to tijensse
[14:00:58] ! jstaniek_work (d943c9a2@gateway/web/freenode/ip.217.67.201.162) has quit (Ping timeout: 250 seconds)
[14:27:42] ! jstaniek_work (d943c9a2@gateway/web/freenode/ip.217.67.201.162) joined #qt-tizen
[14:40:34] <jstaniek_work> hello jpnurmi RzR tijensse
[14:41:05] ! tijensse (quassel@nat/digia/x-hoeedoqzsfhbayhr) parted #qt-tizen ("http://quassel-irc.org - Chat comfortably. Anywhere.")

Support /whois

For day-to-day use of IRC I just cannot survive without function /whois command.

Give options for more precise nick alerts

As discussed in #communi, it would be convenient for users whose nickname is part of a word / other nick to enable case-sensitivity for alerts. Checking word boundaries is another way to handle it.

Wrong section.

SASL mechanisms

Currently only the PLAIN mechanism is supported. We want more! :)

Version number in .prf

Make the libcommuni version number available to qmake .pro files. Inspired by QT_VERSION_XXX:

  • IRC_VERSION
  • IRC_MAJOR_VERSION
  • IRC_MINOR_VERSION
  • IRC_PATCH_VERSION

IrcBufferModel: add support for multiple connections

Any GUI client that wants to support multiple networks wants to have all buffers listed in the same view. It's a bit tedious to proxy/join multiple IrcBufferModel instances (one per each connection). It would be great if a single IrcBufferModel could simply support multiple connections so it could be used in item views as is.

PS. A joined list is more important use case to start with, but perhaps also make it possible to choose between a list vs. tree structure...?

Implement IrcChannelModel::SortMode

Q_PROPERTY(SortMode sortMode READ sortMode WRITE setSortMode NOTIFY sortModeChanged)
Q_ENUMS(DataRole SortMode)
enum SortMode { Unsorted, Activity, Alphabetical };

Somewhat ambigous qmake project names

Thank you for making this project available! We are using it in our MUD client Mudlet but we are encountering a little bit of confusion in the Qt IDE where it uses the name of the qmake .pro/.pri project files as the actual name of the project/sub-project.

Currently our main project file as well as a couple of sub-projects are all being displayed as "src" - whilst we are only using the core of your work so we also have "core" as a sub-project in ours - would you consider renaming that to perhaps be "communi-core" - I realise that the parent/master/main project file for libcommuni is called libcommuni.pro and beneath that you have src.pro/src.pri and then beneath that core.pri/core.pro but I note you previously called the middle level ones communi not src and I was hoping that you might consider some renames so that all the qmake project files contain a "communi" substring and so any one using your project as part of theirs can be clear in Qt Creator which bits are from Communi and which are from something else. 😄

Headless installation?

I need libcommuni for spectrum2 on a headless server. Is there anyway to not drag in every dependency up to and including mesa and wayland?

error during compile qmlbot

cd qmlbot/ && ( test -e Makefile || /root/mxe_stable/usr/bin/i686-w64-mingw32.static-qmake-qt5 /root/libcommuni-3.5.0/examples/qmlbot/qmlbot.pro -o Makefile ) && make -f Makefile
make[2]: Wejście do katalogu '/root/libcommuni-3.5.0/examples/qmlbot'
make -f Makefile.Release
make[3]: Wejście do katalogu '/root/libcommuni-3.5.0/examples/qmlbot'
compiling main.cpp
compiling /root/libcommuni-3.5.0/examples/qmlbot/qmlbot_qml_plugin_import.cpp
compiling /root/libcommuni-3.5.0/examples/qmlbot/qmlbot_plugin_import.cpp
rcc qmlbot.qrc
compiling release/qrc_qmlbot.cpp
linking release/qmlbot.exe
release/main.o:main.cpp:(.text.startup+0x4): undefined reference to `qt_static_plugin_CommuniPlugin()'
collect2: error: ld returned 1 exit status
Makefile.Release:66: polecenia dla obiektu 'release/qmlbot.exe' nie powiodły się
make[3]: *** [release/qmlbot.exe] Błąd 1
make[3]: Opuszczenie katalogu '/root/libcommuni-3.5.0/examples/qmlbot'
Makefile:34: polecenia dla obiektu 'release' nie powiodły się
make[2]: *** [release] Błąd 2
make[2]: Opuszczenie katalogu '/root/libcommuni-3.5.0/examples/qmlbot'
Makefile:117: polecenia dla obiektu 'sub-qmlbot-make_first' nie powiodły się
make[1]: *** [sub-qmlbot-make_first] Błąd 2
make[1]: Opuszczenie katalogu '/root/libcommuni-3.5.0/examples'
Makefile:126: polecenia dla obiektu 'sub-examples-make_first-ordered' nie powiodły się
make: *** [sub-examples-make_first-ordered] Błąd 2
root@vmpredator:~/libcommuni-3.5.0#

SASL over non-SSL connection

The current SASL implementation requires an SSL connection. Do not depend on SSL, but rather on the "sasl" capability being acked. Since this means a change in the login sequence, make sure it still works on servers (with and without passwd) that do not handle capabilities!

Missing QML plugin typeinfo

Generate plugins.qmltypes with qmlplugindump -notrelocatable & add to qmldir:

typeinfo plugins.qmltypes

This ensures that Qt Creator can generate perfect auto-completion.

IrcTextFormat::toHtml() detects incorrect URLs

  • "www/doctools/master"
  • "foo...http://www.fi"
  • ".application.name/version"
  • "wwwwait..."

...

[13:55:55] <qt_gerrit> [www/doctools/master] doc: Adding online header and footer. from jerome.pasion reviewed by jerome.pasion: C: 0 S: 0 - https://codereview.qt-project.org/69794
[15:46:10] <jpnurmi> foo...http://www.fi
[21:04:06] [communi] communi-sailfish/master 59197cc J-P Nurmi: Use Qt.application.name/version in AboutDialog and as part/quit reason
[19:58:52] <Venemo> wwwwait...

...

Naming proposal

The "session" term was inherited from libircclient back in the times when libircclient-qt v0.1 was based on the C-library. The two haven't had anything to do with each other for years, so here comes a proposal for more intuitive names:

  • IrcSession -> IrcConnection
  • IrcSessionInfo -> IrcNetwork(Info)

Ability to suppress any event in rooms.

I always see events like "a joins #b" or "c sets mode +v b". I tried the following: I disabled show events in the settings and I enabled them and played with the user amount but no combination let me suppress the events.

Is it possible to suppress all events and if yes how is it possible?

Modularization

Split the monolithic library to smaller parts:

  • Core: IrcSession, IrcCommand, IrcMessage...
  • Model: IrcBuffer, IrcBufferModel...
  • Util: IrcLagTimer, IrcPalette, IrcTextFormat...

Examples and Tests don't compile with ICU

Examples and Tests don't compile with ICU.
When I do use Uchardet, it works.

compiling debug/moc_ircbot.cpp
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/minimal/../../lib/libIrcCore.a(ircmessagedecoder_icu.o): undefined reference to symbol 'ucsdet_setText'
/usr/lib64/libicui18n.so.60: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [Makefile:68: minimal] Fehler 1
make[2]: Verzeichnis „/var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/minimal“ wird verlassen
make[1]: *** [Makefile:99: sub-minimal-make_first] Fehler 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
compiling debug/moc_ircclient.cpp
linking bot
linking client
make[2]: Verzeichnis „/var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/qmlbot“ wird verlassen
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/bot/../../lib/libIrcCore.a(ircmessagedecoder_icu.o): undefined reference to symbol 'ucsdet_setText'
/usr/lib64/libicui18n.so.60: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück
make[2]: *** [Makefile:72: bot] Fehler 1
make[2]: Verzeichnis „/var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/bot“ wird verlassen
make[1]: *** [Makefile:49: sub-bot-make_first] Fehler 2
make[2]: Verzeichnis „/var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/quick“ wird verlassen
/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/net-im/libcommuni-3.5.0/work/libcommuni-3.5.0/examples/client/../../lib/libIrcCore.a(ircmessagedecoder_icu.o): undefined reference to symbol 'ucsdet_setText'
/usr/lib64/libicui18n.so.60: error adding symbols: DSO missing from command line

Warnings 'overriding commands for target' when building on macOS

Steps to reproduce:

  1. Download the attached libcommuniTest project
  2. Unzip it and open libcommuniTest/libcommuniTest/libcommuniTest.pro.
  3. Compile it on macOS 10.12 or later using Qt Creator 4.4.0

Result: You will see 10 warnings like

libcommuniTest/build-libcommuniTest-Desktop_Qt_5_9_1_clang_64bit-Debug/Makefile:916: warning: overriding commands for target `moc_ircbuffer.cpp'
libcommuniTest/build-libcommuniTest-Desktop_Qt_5_9_1_clang_64bit-Debug/Makefile:858: warning: ignoring old commands for target `moc_ircbuffer.cpp'

libcommuniTest.zip

IrcCompleter

Introduce a generic completer class that provides context aware nick & command completion. It should be possible to hook it up with IrcBufferModel, IrcUserModel & friends, and to use it with QLineEdit & QML TextInput.

Document QML usage

List the qmlRegisterType commands etc. to make it trivial to get started with using Communi types in a QML app.

Full CTCP support

  • FINGER - Returns the user's full name, and idle time.
  • VERSION - The version and type of the client.
  • SOURCE - Where to obtain a copy of a client.
  • USERINFO - A string set by the user (never the client coder)
  • CLIENTINFO - Dynamic master index of what a client knows.
  • ERRMSG - Used when an error needs to be replied with.
  • PING - Used to measure the delay of the IRC network between clients.
  • TIME - Gets the local date and time from other clients.

http://www.irchelp.org/irchelp/rfc/ctcpspec.html

Namespace support

Support building libcommuni into a namespace, to support mixing for example Communi & Quassel code in order to implement QuasselProtocol (IrcProtocol).

Add IrcSession::closeLater()

Inspired by QObject::deleteLater(), consider something like this:

if (session->isConnected()) {
    session->sendCommand(IrcCommand::createQuit(reason));
    connect(session, SIGNAL(disconnected()), session, SLOT(deleteLater()));
    connect(session, SIGNAL(socketError(QAbstractSocket::SocketError)), session, SLOT(deleteLater()));
    QTimer::singleShot(timeout, session, SLOT(deleteLater()));
} else {
    session->deleteLater();
}

Open questions:

  • should the quit-command be left to the user, or pass the quit reason as a parameter?
  • specify the timeout as an optional parameter?

Full QML compatibility

IrcCore:

  • IrcConnection::password() [signal] (-> property)
  • IrcConnection::capabilities() [signal] (send a command / IrcNetwork::requestCapability())
  • IrcConnection::nickNameReserved() [signal] (just set the desired nick)
  • IrcConnection::createCtcpReply() [virtual] (can be "reimplemented" in QML)
  • IrcMessageFilter
  • IrcSender (-> IrcMessage::prefix/nick/ident/host)
  • IrcSessionInfo (-> IrcNetwork)
  • IrcNetwork::channelModes()
  • IrcNetwork::numericLimit()
  • IrcNetwork::modeLimit()
  • IrcNetwork::channelLimit()
  • IrcNetwork::targetLimit()
  • Irc::toString() (-> Irc::codeToString())

IrcModel:

  • IrcBufferModel::create() [virtual] (can be "reimplemented" in QML)
  • IrcBufferModel::destroy() [virtual] (-> IrcBuffer::persistent [property])

IrcUtil:

  • IrcCommandParser
  • IrcTextFormat
  • IrcPalette(-> merged to IrcTextFormat)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.