quassel.git
10 years agoFix header guard
Manuel Nickschas [Sun, 19 Jan 2014 02:11:39 +0000 (03:11 +0100)]
Fix header guard

Thanks Clang.

10 years agoEncapsulate socket state in AuthHandler, properly handle disconnects
Manuel Nickschas [Sat, 18 Jan 2014 18:06:06 +0000 (19:06 +0100)]
Encapsulate socket state in AuthHandler, properly handle disconnects

The actual state of the socket used to connect to the core should be
kept internal to AuthHandler (and RemotePeer), in particular because
we want to handle the detection of legacy cores transparently later.
Also, it does not make sense to handle individual socket states outside
of the classes actually dealing with the socket; handling errors and
disconnection is sufficient. Both AuthHandler and Peer now emit
statusMessage() signals for displaying the socket state in the UI.
Because it was never used nor is it needed, this commits also removes
the AuthHandler::State enum.

While doing this, I also stumbled over the most likely reason for the
problem that the client would sometimes not reconnect to a core even
though it would claim to be disconnected:

QTcpSocket will only emit disconnected() when it had already reached
the Connected state, i.e. not if it was still connecting. While
CoreConnection would detect the socket go back to UnconnectedState,
and set its own state to Disconnected, it would never do its internal
clean-up which was tied to the socket's disconnected() signal, unless
the socket would also emit an error (which it apparently doesn't do
in all cases...). As a result, reconnecting was not possible in these
situations.

With these changes, CoreConnection relies solely on AuthHandler's
disconnected() signal, which is properly emitted even if establishing
the connection fails.

10 years agoUpdate AboutDlg
Manuel Nickschas [Tue, 14 Jan 2014 00:10:41 +0000 (01:10 +0100)]
Update AboutDlg

10 years agoImplement issue #1219: Update the marker line when quassel loses focus
Chris H (Shade / Zren) [Thu, 22 Aug 2013 22:25:51 +0000 (18:25 -0400)]
Implement issue #1219: Update the marker line when quassel loses focus

Solves issue #1219 on bugs.quassel-irc.org.

We now listen for QEvent::WindowDeactivate in the main window. This
should pickup on window closing/minimizing/losing focus. We also change
view->setMarkerLine() to Client::setMarkerLine which will send an event
to the syncher, and eventually arrives at ChatView::markerLineSet, which
moves the marker line for us.

10 years agoSocket options require Qt 4.6+
Manuel Nickschas [Mon, 13 Jan 2014 23:35:33 +0000 (00:35 +0100)]
Socket options require Qt 4.6+

10 years agoset SO_KEEPALIVE on client sockets
Daniel Albers [Mon, 6 Jan 2014 14:27:12 +0000 (15:27 +0100)]
set SO_KEEPALIVE on client sockets

10 years agoImprove reliability of SSL connections
Michael Marley [Wed, 11 Dec 2013 21:15:58 +0000 (21:15 +0000)]
Improve reliability of SSL connections

First, this fixes a bug similar to Bug #1249 except for SSL
connections.  If the TCP connection fails but isn't
actually closed before the SSL handshake is complete,
Quassel will become stuck and never attempt to reconnect.
The solution is to start the ping timeout even earlier,
before the connection is established at all.

Second, this fixes the issue where multiple presses of the
"Disconnect" button and long waits were required to close
certain broken SSL connections (where SSL negotiation was
not yet complete, as above).  The solution is to call
socket.abort() instead of socket.disconnectFromHost(),
which will ensure that the socket is closed immediately.
Additionally, in case that fails for some reason, the
socketCloseTimer is no longer a single-shot timer, so
if the first abort doesn't work, it will keep trying.

(Probably?) fixes bug #1005

10 years agoUse a different icon for web search
Manuel Nickschas [Mon, 13 Jan 2014 23:00:35 +0000 (00:00 +0100)]
Use a different icon for web search

10 years agoSearch the web with selected text.
Chris H (Shade / Zren) [Wed, 3 Apr 2013 00:52:02 +0000 (20:52 -0400)]
Search the web with selected text.

Add context menu option when selecting text in order to search the web for the selection.
The url used in web search configurable in the ChatView settings panel.
Uses the zoom-in icon until it gets it's own icon.

10 years agoHappy New Year!
Manuel Nickschas [Wed, 1 Jan 2014 22:25:47 +0000 (23:25 +0100)]
Happy New Year!

10 years agoMake DCC support opt-in for now
Manuel Nickschas [Wed, 1 Jan 2014 22:11:03 +0000 (23:11 +0100)]
Make DCC support opt-in for now

As support for DCC is unfinished, untested and potentially dangerous
(i.e. one could spam your desktop with millions of dialog boxes), disable
it by default.

People really wanting to play around with this may start the core
with --enable-experimental-dcc, but you have been warned.

10 years agoRemove unused slots
Manuel Nickschas [Wed, 1 Jan 2014 22:02:42 +0000 (23:02 +0100)]
Remove unused slots

10 years agoFirst working version of DCC Receive
Manuel Nickschas [Wed, 1 Jan 2014 21:54:23 +0000 (22:54 +0100)]
First working version of DCC Receive

This finally allows accepting a file via DCC and storing it on the client side.
Note that this is still a very basic implementation, in particular missing

  * Proper status messages (still claiming to receive unknown CTCP, for example)
  * Proper error handling
  * Proper testing
  * Any kind of configuration
  * Any kind of UI besides the simple dialog on incoming files
  * No queuing or any form of transfer management
  * Things like DCC REVERSE

However, it serves as a nice proof-of-concept for the general approach of
passing data directly to a particular client using the usual sync mechanism
(i.e. no special protocol support or additional connections needed). First
client to accept the transfer will get the file.

Note that the *core* is the one handling the DCC connection itself, so things
like port forwarding or firewall support need to be done core-side.

10 years agoMainWin should get a ClientTransfer pointer
Manuel Nickschas [Wed, 1 Jan 2014 21:51:25 +0000 (22:51 +0100)]
MainWin should get a ClientTransfer pointer

Just listening to the appropriate signal makes more sense if we
actually want to use client-side functions later.

10 years agoRefactor the transfer stuff
Manuel Nickschas [Sat, 28 Dec 2013 21:26:27 +0000 (22:26 +0100)]
Refactor the transfer stuff

Well, sometimes refactorings come sooner than usual. While thinking
about the next steps, I decided to handle the actual transfer logic
inside Transfer rather than TransferManager - now that we can have
selective (peer-based) sync calls as well, that makes more sense than
outsourcing that to TransferManager. Thus, it now makes lots of sense
to have ClientTransfer and CoreTransfer, as the logic will be quite
different.

I also took the opportunity to clean up the accessors and make them
safer; you can now get a non-const CoreTransfer pointer, for example,
but still only a const ClientTransfer pointer.

Also, some useful signals have been added.

10 years agoAdd handler for DCC-SEND
Manuel Nickschas [Sat, 28 Dec 2013 19:35:51 +0000 (20:35 +0100)]
Add handler for DCC-SEND

This adds a basic handler for incoming DCC-SEND requests. Note that not
all features are supported yet, there are no settings and no way to disable
it. Also, the EventStringifier hasn't been adapted yet, so there will be
a warning about an unknown event in the status buffer...

10 years agoAdd a very rudimentary UI for accepting a transfer
Manuel Nickschas [Sat, 28 Dec 2013 17:55:20 +0000 (18:55 +0100)]
Add a very rudimentary UI for accepting a transfer

This is just a temporary solution for being able to accept or
reject an incoming transfer. We just display a little dialog and offer
a way to specify a path for saving.

This lacks many features and will be replaced by a proper transfer manager
widget later.

10 years agoMake the Transfer::accept() and ::reject() machinery work
Manuel Nickschas [Sat, 28 Dec 2013 17:49:54 +0000 (18:49 +0100)]
Make the Transfer::accept() and ::reject() machinery work

This adds the necessary stuff to be able to accept/reject a transfer
on the client side, syncing it on the core side and setting the
necessary signals. The core also receives a PeerPtr, so it can keep
track of which peer actually accepted the transfer.

10 years agoAdd missing accessors to TransferManager
Manuel Nickschas [Sat, 28 Dec 2013 16:56:36 +0000 (17:56 +0100)]
Add missing accessors to TransferManager

Nice to be able to access the list of transfers.

10 years agoTransfer needs a nick attribute
Manuel Nickschas [Sat, 28 Dec 2013 16:53:19 +0000 (17:53 +0100)]
Transfer needs a nick attribute

So we can show who sent us a file, which may be a nice thing to know.

10 years agoDelete the TransferManager on disconnect
Manuel Nickschas [Sat, 28 Dec 2013 16:49:28 +0000 (17:49 +0100)]
Delete the TransferManager on disconnect

Makes sense, doesn't it...?

10 years agoMake the PeerPtr trick work with sync calls as well
Manuel Nickschas [Fri, 27 Dec 2013 20:24:43 +0000 (21:24 +0100)]
Make the PeerPtr trick work with sync calls as well

The mechanics for replacing a PeerPtr as first argument by the
sending peer (and using it as a filter for the other direction)
are already in place; with just some tweaks we can also make it
work for sync calls in addition to RPC calls, which allows for
selectively calling methods in your sync partner.

10 years agoBasic infrastructure for file transfers
Manuel Nickschas [Thu, 26 Dec 2013 19:57:34 +0000 (20:57 +0100)]
Basic infrastructure for file transfers

This introduces the Transfer class as well as TransferManager and the
specialized versions for client and core. It also adds the needed accessors
in Client and CoreSession as well as the SyncableObject stuff to make it all
work together.

To make something happen, a Transfer needs to be created on the core side with
the appropriate attributes; it needs then to be synchronized and handed over
to CoreTransferManager::addTransfer(). This will trigger the creation of the
appropriate Transfer object on the client side, adding this to the
ClientTransferManager as soon as synchronization is complete (meaning, the
transferAdded() signal will be fired with a fully synchronized Transfer object).

Note that the list of transfers is not synchronized (yet?), so there won't be a
transfer history on re-sync.

10 years agoAllow peer-specific sending and receiving of remote signals
Manuel Nickschas [Sun, 10 Nov 2013 22:25:07 +0000 (23:25 +0100)]
Allow peer-specific sending and receiving of remote signals

For file transfers and possibly other use cases, it is important to know
which peer has received a specific signal, and to allow sending remote
signals only through a particular peer rather than multicasting to all connected
clients.

For this reason, we now treat attached signals/slots specially if their first
argument is a PeerPtr (a typedef for Peer *):

* An attached slot will have a pointer to the peer which received the signal in
  its first argument
* An attached signal on the core side will be relayed only through the peer that
  is given as the first argument (and the receiving slot will have a pointer to
  the client-side peer in this argument)
* The peer argument for an attached signal on the client side will be ignored,
  as clients only have one peer anyway

10 years agoFix fullscreen mode
Manuel Nickschas [Sun, 22 Dec 2013 23:48:45 +0000 (00:48 +0100)]
Fix fullscreen mode

In some setups, the FullScreen action would get out of sync with
the actual window state and thus kick Quassel into an endless loop
and finally a crash when toggling full screen mode.

Turns out reading the docs for KToggleFullScreenAction helped doing
this properly (avoiding this and other bugs when using QWidget's methods).

Thanks to yofel and hays for reporting, and apachelogger for putting
me on the right track for fixing this.

Fixes #1153, fixes #1258.

10 years agocode style
Patrick von Reth [Wed, 4 Dec 2013 10:17:32 +0000 (11:17 +0100)]
code style

10 years agoremoved debug output
Patrick von Reth [Mon, 25 Nov 2013 13:33:16 +0000 (14:33 +0100)]
removed debug output

10 years agocode style in snore backend, and a more user friendly config widget
Patrick von Reth [Mon, 25 Nov 2013 11:46:02 +0000 (12:46 +0100)]
code style in snore backend, and a more user friendly config widget

10 years agoFix notifications when minimized. 50/head
Martin Sandsmark [Tue, 17 Dec 2013 15:26:39 +0000 (16:26 +0100)]
Fix notifications when minimized.

QWidget::isVisible() just checks if the widget has been explicitly
hidden, not if it is minimized, covered, or whatnot.

Fixes #1240

10 years agoMake sys includes POSIX-compliant
Manuel Nickschas [Thu, 28 Nov 2013 00:45:43 +0000 (01:45 +0100)]
Make sys includes POSIX-compliant

We're using <sys/resources.h> in quassel.cpp for the backtrace generation
stuff. Documentation for that header indicates that <sys/time.h> shall also
be included (even though it doesn't seem to be needed for our usage).
Additionally, compiling started to fail in recent FreeBSD versions, because
we lacked the <sys/types.h> include, which seems to be mandated by POSIX
(but not on Linux, although it won't hurt to have it).

tl;dr: This should make Quassel compile on recent versions of FreeBSD again.

10 years agoUpdate ChangeLog
Manuel Nickschas [Tue, 26 Nov 2013 21:25:25 +0000 (22:25 +0100)]
Update ChangeLog

We had to postpone the release by a day.

10 years agoupdate quassel.pot
Daniel Albers [Mon, 25 Nov 2013 00:08:25 +0000 (01:08 +0100)]
update quassel.pot

10 years agotransifex.net → .com
Daniel Albers [Sun, 24 Nov 2013 23:41:10 +0000 (00:41 +0100)]
transifex.net → .com

10 years agotx-sync.sh: try to pull first
Daniel Albers [Sat, 26 Oct 2013 23:28:58 +0000 (01:28 +0200)]
tx-sync.sh: try to pull first

10 years agomark string untranslatable
Daniel Albers [Fri, 25 Oct 2013 09:45:34 +0000 (11:45 +0200)]
mark string untranslatable

10 years agoUpdate translations from Transifex
Daniel Albers [Sat, 12 Oct 2013 03:00:37 +0000 (05:00 +0200)]
Update translations from Transifex

Many thanks to:
 - cs: Vít Pelčák <vit@pelcak.org>
 - da: furyfire <frazzer@hotmail.com>
 - de: m4yer <m4yer+quassel@minad.de>, ToBeFree <tobias@freiwuppertal.de>, Heffer <felix@fetzig.org>
 - eo: cordata <tiffypet@yahoo.com>
 - fi: Larso <larso@gmx.com>
 - fr: Dorian <munto@free.fr>, GrecKo <gr3cko@gmail.com>
 - gl: Condex <elgomaisa@gmail.com>
 - hi: libregeekingkid <rajuvindane@gmail.com>
 - hu: ulysses <ulysses@kubuntu.org>
 - mr: libregeekingkid <rajuvindane@gmail.com>
 - nl: simonphilips <simon.philips@gmail.com>
 - oc: Cedric31 <cvalmary@yahoo.fr>
 - pl: derpella <matwa@poczta.pl>
 - pl: Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
 - pt_BR: Pad <pedroaraujo@colorlesscube.com>
 - ro: roentgen <arthur.titeica@gmail.com>
 - sr: JovanJ <jovanjojkic@gmail.com>
 - tr: volkangezer <volkangezer@gmail.com>, zeugma <sunder67@hotmail.com>
 - uk: Yuri Chornoivan <yurchor@ukr.net>
 - zh_CN: leonfeng <rainofchaos@gmail.com>

10 years agoUpdate ChangeLog
Manuel Nickschas [Sun, 24 Nov 2013 16:39:32 +0000 (17:39 +0100)]
Update ChangeLog

10 years agoUpdate AboutDlg
Manuel Nickschas [Sun, 24 Nov 2013 16:29:07 +0000 (17:29 +0100)]
Update AboutDlg

Some new contributors deserve mentioning.

10 years agoAdd separator after "Copy Selection" context menu
Manuel Nickschas [Sun, 24 Nov 2013 19:07:24 +0000 (20:07 +0100)]
Add separator after "Copy Selection" context menu

This went away with the commit fixing the menu for selections on
clickables, and is now being brought back.

10 years agoFix context menu not being restored properly
Manuel Nickschas [Sun, 24 Nov 2013 18:55:00 +0000 (19:55 +0100)]
Fix context menu not being restored properly

When showing a context menu on a clickable, we used to hide existing
context menu item to avoid confusing the user. However, those actions
were never unhidden again. This resulted in the context menu not showing
most options ever again in subsequent invocations.

Instead of hiding the actions, we now just clear the menu.

10 years agoAdd the "Copy Selection" context menu item after checking for chat items
Jerome Leclanche [Fri, 18 Oct 2013 15:41:27 +0000 (16:41 +0100)]
Add the "Copy Selection" context menu item after checking for chat items

When right clicking a channel, Quassel will drop all other items from
the context menu.
We work around this by checking for a selection after everything else
has been added to the menu, and make sure to add the Copy Selection item
at the top.

Fixes issues #1031 and #1048

10 years agoMake sure that clients can't access buffers belonging to other users
Marcus Eggenberger [Sun, 24 Nov 2013 16:03:34 +0000 (17:03 +0100)]
Make sure that clients can't access buffers belonging to other users

A manipulated, but properly authenticated client was able to retrieve
the backlog of other users on the same core in some cases by providing
an appropriate BufferID to the storage engine. Note that proper
authentication was still required, so exploiting this requires
malicious users on your core. This commit fixes this issue by ensuring
that foreign BufferIDs are off-limits.

10 years agoupdate translation files according to previous commit
Daniel Albers [Sat, 23 Nov 2013 14:58:48 +0000 (15:58 +0100)]
update translation files according to previous commit

10 years agoFix grammar bug in ChatViewSettings
Manuel Nickschas [Sat, 23 Nov 2013 14:50:23 +0000 (15:50 +0100)]
Fix grammar bug in ChatViewSettings

Thanks to Redmar over at Launchpad for noticing.

10 years agoAdd disconnection reasons
Manuel Nickschas [Thu, 21 Nov 2013 23:41:56 +0000 (00:41 +0100)]
Add disconnection reasons

This will display the reason for disconnection from the core in case of
an incompatible protocol version or missing SSL in the status bar.

10 years agoDon't crash after displaying a connection error popup
Manuel Nickschas [Thu, 21 Nov 2013 23:39:29 +0000 (00:39 +0100)]
Don't crash after displaying a connection error popup

Error popups are modal dialogs running a nested event loop, which means
that events will continue to be processed while the popup is showing.
In this particular case, the socket would close, and the authhandler calling
the popup synchronously would be deleted, leading to a segfault when closing
the popup.

Making this a queued connection prevents this from happening, as control is
not going to be returned to the deleted authhandler that way.

10 years agofixed crash with systray backend
Patrick von Reth [Tue, 19 Nov 2013 22:09:26 +0000 (23:09 +0100)]
fixed crash with systray backend

10 years agoclean apply of the whole snore patches
Patrick von Reth [Tue, 15 Oct 2013 15:13:43 +0000 (17:13 +0200)]
clean apply of the whole snore patches

10 years agoAdd QUrl include for Phonon
Manuel Nickschas [Tue, 19 Nov 2013 23:01:41 +0000 (00:01 +0100)]
Add QUrl include for Phonon

Looks like some Qt versions just forward-declare QUrl, so this is
needed.

10 years agoAdd core commandline option to require SSL for client connections.
Michael Marley [Wed, 13 Nov 2013 16:48:15 +0000 (11:48 -0500)]
Add core commandline option to require SSL for client connections.

If the --require-ssl commandline option is passed when starting the core,
it will reject any client that does not use SSL.

10 years agoAdd function in bufferinfo.cpp to report if chat messages are accepted
Michael Marley [Sat, 16 Nov 2013 18:40:54 +0000 (13:40 -0500)]
Add function in bufferinfo.cpp to report if chat messages are accepted

This works around https://github.com/sandsmark/QuasselDroid/issues/98 on
the server side by preventing new buffers from being created if the user
accidentally (or maliciously) attempts to send chat messages in status buffers.
Previously, this would have screwed up the status buffer requiring a manual
DB query to fix.  This should be fixed in Quasseldroid quite soon, but this
patch will just ensure that the core's DB does not get corrupted by older
Quasseldroid clients if the users do not update.

10 years agoEnable the ping timeout as soon as the connection to IRC is open.
Michael Marley [Wed, 13 Nov 2013 12:03:45 +0000 (07:03 -0500)]
Enable the ping timeout as soon as the connection to IRC is open.

This fixes the problem where Quassel would get stuck while connecting
if the socket is closed by the server but the core is, for whatever
reason, not notified of this.  This patch works by enabling the ping
timeout as soon as the connection is open, but not actually sending any
PINGs until the IRC authentication is complete.  This will cause the core
to reconnect if at any point it doesn't receive data from the server for
more than the usual ping timeout interval.

Fixes #1249

10 years agoAvoid Phonon's deprecation warnings
Manuel Nickschas [Tue, 19 Nov 2013 22:01:16 +0000 (23:01 +0100)]
Avoid Phonon's deprecation warnings

MediaSource prefers a QUrl now. This shouldn't break with older Phonon
versions, I hope, since it seems MediaSource(QUrl) has been around since
forever.

10 years agoFix the Phonon notification backend not playing any sound
Manuel Nickschas [Tue, 19 Nov 2013 21:59:47 +0000 (22:59 +0100)]
Fix the Phonon notification backend not playing any sound

Phonon won't report its capabilities before a player has been created,
which leads to Quassel thinking that it can't play audio since we checked
for that before instantiating the player.

Some reordering in the ctor fixes this.

10 years agoFix expression in IrcEvent::create()
Manuel Nickschas [Tue, 19 Nov 2013 21:19:47 +0000 (22:19 +0100)]
Fix expression in IrcEvent::create()

We need to inverse the mask, obviously. Thanks to Tucos for pointing
this out.

10 years agoRename settingspages.inc to settingspages.cmake
Manuel Nickschas [Tue, 19 Nov 2013 21:17:59 +0000 (22:17 +0100)]
Rename settingspages.inc to settingspages.cmake

While CMake itself doesn't care about the file extension, it seems to make
recent KDevelop crash.

10 years agoFix datatypes in the legacy handshake
Manuel Nickschas [Thu, 14 Nov 2013 20:31:18 +0000 (21:31 +0100)]
Fix datatypes in the legacy handshake

Turns out we accidentally some datatypes. SupportsCompression should
be a bool, and protocolVersion an uint. Changing this breaks QuasselDroid
and wasn't done on purpose anyway.

10 years agoFix flushing of sockets, causing random sync errors
Manuel Nickschas [Tue, 12 Nov 2013 23:37:12 +0000 (00:37 +0100)]
Fix flushing of sockets, causing random sync errors

TIL that flushing a socket may trigger a readyRead(). In certain cases
this would lead to compression being enabled on the client side too late
(because we would flush the socket before), breaking the sync to core.

As (contrary to starting SSL) enabling the compression does not care if
there's still uncompressed data in the socket's write buffer, we can just
remove this flush.

Also, let's make it explicit that we flush immediately before starting
encryption, rather than hiding that somewhere in the LegacyPeer, to avoid
introducing weird bugs later. And also flush the socket before handing the
peer over to the CoreSession, as we used to do before the refactoring -
we don't want bug #682 back.

10 years agoSessionState needs to be a registered meta type
Manuel Nickschas [Thu, 7 Nov 2013 22:41:05 +0000 (23:41 +0100)]
SessionState needs to be a registered meta type

This is because the mono client sends the session state through
a queued signal connection.

10 years agoAlways send disconnected() on socket errors
Manuel Nickschas [Thu, 7 Nov 2013 22:03:06 +0000 (23:03 +0100)]
Always send disconnected() on socket errors

Some socket errors (e.g. connection refused) don't trigger a disconnected()
from the socket, mostly because the socket hadn't been opened in the
first place.

To simplify the logic elsewhere, let's always send (exactly) one disconnected()
from the AuthHandler in case of socket errors. That way, we don't have to
introduce the mess we used to have in the reconnection logic in CoreConnection.

10 years agoAbstract away the protocol handshake code
Manuel Nickschas [Thu, 7 Nov 2013 19:35:55 +0000 (20:35 +0100)]
Abstract away the protocol handshake code

This continues (and hopefully mostly concludes) the work begun
in 0e1b154 - abstracting away everything protocol-related from the
rest of the code, so we can later add another protocol. It's also
nice to not have all sorts of network- and protocol-related stuff
intertwined into central classes like Core and CoreConnection.

Note that nothing should change for end-users, modulo bugs. So new
and old client and core should work together in all combinations,
with and without SSL and/or compression. Please let me know if
something's wonky. That's also true for things like connection failure
handling and reconnects, as there have been many changes in those areas.

Turns out that abstracting the handshake stuff was much harder and
much more invasive than the previous work in SignalProxy. Turns also
out that the legacy handshake protocol is not the best ever. So
this touches lots of places in the code; sorry for a diff with over
3000 lines, but there was no way to sanely split the commits.

Anyway, here's the gist of it:

* Add auth handlers on both core and client side that process the
  handshake based on the generic message types in protocol.h - lots
  of code moved from CoreConnection and Core into the new classes.
  Note that "AuthHandler" is a stupid name for what it does, so we'll
  probably rename it to HandshakeHandler or something later.

* Extend LegacyPeer to translate the new message types to and from the
  legacy format, moving protocol-specific code out of the existing classes.
  Right now only "compat mode" is supported, i.e. the handshake we've
  been using for what feels like a decade. In the future, some of that
  should be done much nicer whilst keeping the same wire format. For now,
  there's several quirks in LegacyPeer to somehow map the insanities in
  the existing protocol to something that won't bite us in the future once
  we want to clean up that mess.

* Auth handlers will create the peer now - this is because later on the
  peer we need will be determined by protocol detection, which is part
  of the handshake.

* Use the generic protocol message types directly where it makes sense
  (in particular for things like SessionState) - instead of QVariantMaps.

* Lots of cleanups, API changes etc. were done in passing.

* Probably more that I choose to not remember right now.

10 years agoAdd handshake message types to protocol.h
Manuel Nickschas [Thu, 7 Nov 2013 19:06:00 +0000 (20:06 +0100)]
Add handshake message types to protocol.h

These are all the message types that are needed for the initial
handshake, before things get handed over to the SignalProxy.

10 years agoMake protocol messages structs instead of classes
Manuel Nickschas [Tue, 26 Feb 2013 22:04:40 +0000 (23:04 +0100)]
Make protocol messages structs instead of classes

Encapsulation with private members and accessors is nice, but for something
that is just a POD and will most probably stay that way, it's overkill [1].
So we're turning the classes into structs with direct member access.

Most beneficially, this makes protocol.h much nicer to read.

As a bonus, we introduce a common baseclass that holds the handler() method to
remove duplication.

[1] Even Qt sets a precedent for that, e.g. QPair and many other PODs that are
    implemented as structs with public member access even in the public API.

10 years agoFix build without SSL
Manuel Nickschas [Thu, 7 Nov 2013 20:44:11 +0000 (21:44 +0100)]
Fix build without SSL

This one slipped in.

10 years agoSanitize topic message 40/head
Florent Castelli [Wed, 16 Oct 2013 21:15:23 +0000 (23:15 +0200)]
Sanitize topic message

The code handling the topic message isn't expecting any new lines
since it is usually not possible to have any from the IRC specs.
But we can have some Unicode new lines instead!
Qt is happily converting them to simple new lines which then crashes
the client with a stack overflow.

10 years agoUpdate translations from Transifex
Daniel Albers [Wed, 17 Apr 2013 03:00:47 +0000 (05:00 +0200)]
Update translations from Transifex

Many thanks to:
 - cs: Vít Pelčák <vit@pelcak.org>
 - da: furyfire <frazzer@hotmail.com>
 - de: Heffer <felix@fetzig.org>
 - el: differentreality <differentreality@gmail.com>, Γιάννης Ανθυμίδης <yannanth@gmail.com>, warlordfff <warlordfff@gmail.com>, tampakrap <tampakrap@gmail.com>
 - es: Adolfo Jayme Barrientos <fitoschido@ubuntu.com>, Dongorongoro <jonathan@haitu-yu.com>
 - fi: Larso <larso@gmx.com>
 - hi: libregeekingkid <rajuvindane@gmail.com>
 - ko: Sungjin Gang <potopro@gmail.com>
 - mr: libregeekingkid <rajuvindane@gmail.com>
 - nb: sandsmark <sandsmark@samfundet.no>
 - pt_BR: Pad <pedroaraujo@colorlesscube.com>
 - tr: volkangezer <volkangezer@gmail.com>

10 years agonew file: .travis.yml
Daniel Albers [Sat, 31 Aug 2013 18:04:26 +0000 (20:04 +0200)]
new file:   .travis.yml

10 years agoFixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Marcus Eggenberger [Thu, 10 Oct 2013 11:26:39 +0000 (13:26 +0200)]
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.

Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/browse/QTBUG-30076
Thanks to brot and Tucos.

[Fixes #1244]

10 years agoFix warnings found by Clang
Manuel Nickschas [Thu, 10 Oct 2013 19:09:16 +0000 (21:09 +0200)]
Fix warnings found by Clang

A couple of mismatched tags, and an unused parameter.

10 years agoRemove unused field from QssParser
Manuel Nickschas [Thu, 10 Oct 2013 19:08:28 +0000 (21:08 +0200)]
Remove unused field from QssParser

Clang found out that we never use _maxUserHash, so remove it.

10 years agoAdd compiler flags for Clang
Manuel Nickschas [Thu, 10 Oct 2013 19:07:43 +0000 (21:07 +0200)]
Add compiler flags for Clang

10 years agoRespond to CTCP PING even if it had no parameter.
Bas Pape [Sat, 7 Sep 2013 11:09:06 +0000 (13:09 +0200)]
Respond to CTCP PING even if it had no parameter.

Normally the response param is whatever came in, but e.g. qwebirc does
not send any params if the user does not explicitly specify any. This
would result in "Received unknown CTCP-PING". This patch makes quassel
respond with any empty string.

10 years agoAdd some numerics to the 'Just display' list.
Bas Pape [Wed, 28 Aug 2013 19:27:49 +0000 (21:27 +0200)]
Add some numerics to the 'Just display' list.

These are all defined in RFC 2812, but were not displayed as server
messages by quassel:
256 (RPL_ADMINME), 257 (RPL_ADMINLOC1), 258 (RPL_ADMINLOC2),
259 (RPL_ADMINEMAIL) and 263 (RPL_TRYAGAIN, this one is technically an
error, thus shown as such).

10 years agoUse the old way of finding translations for OSX.
Bas Pape [Wed, 28 Aug 2013 18:32:21 +0000 (20:32 +0200)]
Use the old way of finding translations for OSX.

Many OSX users reported their clients being in Japanese, rather than
English, since 0.9.0, which turned out to be due to
QSystemLocale::query for QSystemLocal::UILanguages (internally done by
Qt if a QLocale is passed to QTranslator::load) returning 'en', rather
than the proper local form (e.g. 'en-US').
As 'en' has no translation, the second language got picked up, which
happened to be 'ja', which does have a translation.

Fixes #1233 (but reintroduces #1194 on OSX)

10 years agoRemove CoreBasicHandler::displayMsg without type.
Bas Pape [Thu, 29 Aug 2013 18:28:27 +0000 (20:28 +0200)]
Remove CoreBasicHandler::displayMsg without type.

Incomprehensible code, which actually caused a segfault in most of the
few places it was used. The only useful part is calling typeByTarget,
but that can be done in the calling site just as well.

10 years agoIndicate whether a key is set for the buffer.
Bas Pape [Mon, 26 Aug 2013 21:01:25 +0000 (23:01 +0200)]
Indicate whether a key is set for the buffer.

This adds a lock icon on the right of the input widget when a key is
set for the current buffer. Encryption was isolated within CoreIrcUser
and CoreIrcChannel, so a new property on IrcUser and IrcChannel is
necessary to sync the current status.

10 years agoDo not allow keyx to be used on channels.
Bas Pape [Sun, 25 Aug 2013 16:41:33 +0000 (18:41 +0200)]
Do not allow keyx to be used on channels.

Given that incoming exchanges are ignored for channels, it makes no
sense to send them either.

10 years agoPrepend the mode of operation to showkey's output.
Bas Pape [Sun, 25 Aug 2013 14:48:19 +0000 (16:48 +0200)]
Prepend the mode of operation to showkey's output.

10 years agoRemove unused cipher map.
Bas Pape [Sun, 25 Aug 2013 14:21:09 +0000 (16:21 +0200)]
Remove unused cipher map.

Since the refactoring in 3146ad this map is unused.

10 years agoProperly detect CBC in key negotiation.
Bas Pape [Sun, 25 Aug 2013 13:52:40 +0000 (15:52 +0200)]
Properly detect CBC in key negotiation.

When FiSH starts a key exchange, it appends CBC to the key to indicate
that it wants to use CBC rather than EBC. The cipher code simply
rejected this key.

10 years agoDon't respond to key exchange requests in channels
Bas Pape [Sun, 25 Aug 2013 09:07:00 +0000 (11:07 +0200)]
Don't respond to key exchange requests in channels

10 years agoStrip formatting when looking up the clickable.
Bas Pape [Tue, 27 Aug 2013 19:59:37 +0000 (21:59 +0200)]
Strip formatting when looking up the clickable.

In the TopicWidget the list of Clickables is initialized with text
stripped of formatting, so when looking up their positions again, the
formatting should be stripped as well.

Fixes #1115

10 years agoRemove stray whitespace in INSTALL and README.
Luke Faraone [Sun, 9 Jun 2013 06:53:15 +0000 (02:53 -0400)]
Remove stray whitespace in INSTALL and README.

10 years agotypes.h: add missing include
J-P Nurmi [Thu, 23 May 2013 20:33:43 +0000 (22:33 +0200)]
types.h: add missing include

10 years agoUpdate INSTALL info on LINGUAS. 30/head
Bas Pape [Mon, 29 Jul 2013 22:56:16 +0000 (00:56 +0200)]
Update INSTALL info on LINGUAS.

Since 2573fe44 the buildsystem no longer uses a seperate option for LINGUAS, but rather uses the environment variable of the same name.

10 years agofix timestamp in Russian day change message
Daniel Albers [Tue, 9 Jul 2013 09:26:28 +0000 (11:26 +0200)]
fix timestamp in Russian day change message

10 years agoMerge pull request #26 from TheOneRing/master
Daniel Albers [Wed, 3 Jul 2013 14:56:24 +0000 (07:56 -0700)]
Merge pull request #26 from TheOneRing/master

fixed build with kde on windows

10 years agofixed build with kde on windows 26/head
Patrick von Reth [Wed, 3 Jul 2013 13:08:50 +0000 (15:08 +0200)]
fixed build with kde on windows

10 years agoNever use the expressions "allows to", "helps to", "requires to" etc. Each of these...
Alf Gaida [Sat, 27 Apr 2013 10:53:59 +0000 (12:53 +0200)]
Never use the expressions "allows to", "helps to", "requires to" etc. Each of these expressions requires a direct object.
fixes some  lintian warnings in debianoid systems

10 years agoShow a message when failing to load the key file 17/head
Bas Pape [Thu, 16 May 2013 17:33:13 +0000 (19:33 +0200)]
Show a message when failing to load the key file

People got confused when quassel did not accept their keyfile; now a
message is shown hinting at the possibility of a passphrase being
present.

10 years agoOnly show warning about QCA on user input.
Bas Pape [Tue, 14 May 2013 22:16:01 +0000 (00:16 +0200)]
Only show warning about QCA on user input.

When compiled with QCA support, merely trying to decrypt messages
should not warn about missing qca-ossl; this message should only be
shown on user input (such as the key-related commands) and incoming
messages really requiring qca-ossl to function (key exchange).

10 years agoFix replacing Horizontal Tab with the unicode char
Bas Pape [Tue, 14 May 2013 22:01:11 +0000 (00:01 +0200)]
Fix replacing Horizontal Tab with the unicode char

Commit 4676ff82af669595edaf090c97a28161d67782a1 caused horizontal tabs
to be replaced with the HT character of the unicode control char block.
Fix that by replacing it with 8 spaces again.

10 years agoPartial reorganization of Mac OS bundeling script.
Marcus Eggenberger [Thu, 9 May 2013 10:32:55 +0000 (12:32 +0200)]
Partial reorganization of Mac OS bundeling script.

10 years agoAfter thorough considerations and long discussions, we finally decided to included...
Marcus Eggenberger [Tue, 7 May 2013 19:04:53 +0000 (21:04 +0200)]
After thorough considerations and long discussions, we finally decided to included phonon with the bundled Mac OS X client...

10 years agoUpdated packaging scripts for Mac OS X
Marcus Eggenberger [Sun, 5 May 2013 10:12:20 +0000 (12:12 +0200)]
Updated packaging scripts for Mac OS X

11 years agoUpdate ChangeLog
Manuel Nickschas [Tue, 16 Apr 2013 21:42:12 +0000 (23:42 +0200)]
Update ChangeLog

11 years agoFinally fix reconnection logic
Manuel Nickschas [Tue, 16 Apr 2013 21:06:57 +0000 (23:06 +0200)]
Finally fix reconnection logic

Really, that part of the code needs a good old refactoring.

11 years agoUpdate about dialog once again for new translations
Manuel Nickschas [Tue, 16 Apr 2013 20:47:17 +0000 (22:47 +0200)]
Update about dialog once again for new translations

11 years agoupdate translation template - adds 15 new strings
Daniel Albers [Mon, 15 Apr 2013 23:46:56 +0000 (01:46 +0200)]
update translation template - adds 15 new strings

11 years agoUpdate translations from Transifex
Daniel Albers [Mon, 15 Apr 2013 23:33:07 +0000 (01:33 +0200)]
Update translations from Transifex

Newly added languages: Esperanto (eo), Lithuanian (lt), Romanian (ro) and
Serbian (sr)

Many thanks to:
 - cs: Vít Pelčák <vit@pelcak.org>
 - de: ToBeFree <tobias@freiwuppertal.de>
 - eo: cordata <tiffypet@yahoo.com>, <recoverybenk@gmail.com>
 - es: Adolfo Jayme Barrientos <fitoschido@gmail.com>, enjolras <yo@miguelrevilla.com>
 - fi: Larso <larso@gmx.com>, Lasse Liehu <lasse.liehu@gmail.com>
 - lt: Liudas Alisauskas <liudas@akmc.lt>
 - nb: sandsmark <sandsmark@samfundet.no>
 - ro: Sergiu Bivol <sergiu@ase.md>
 - ru: sfionov <fionov@gmail.com>
 - sr: Jovan Jojkić <jovanjojkic@gmail.com>
 - tr: Volkan Gezer <volkangezer@gmail.com>
 - tr: zeugma <sunder67@hotmail.com>
 - uk: Yuri Chornoivan <yurchor@ukr.net>