Merge pull request #5 from Tucos/feat-keyx
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Feb 2013 22:27:25 +0000 (14:27 -0800)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 19 Feb 2013 22:27:25 +0000 (14:27 -0800)
Add support for key exchange

419 files changed:
CMakeLists.txt
scripts/build/Info.plist
src/client/abstractmessageprocessor.cpp
src/client/abstractmessageprocessor.h
src/client/abstractui.cpp
src/client/abstractui.h
src/client/backlogrequester.cpp
src/client/backlogrequester.h
src/client/backlogsettings.h
src/client/buffermodel.cpp
src/client/buffermodel.h
src/client/buffersettings.cpp
src/client/buffersettings.h
src/client/bufferviewoverlay.cpp
src/client/bufferviewoverlay.h
src/client/client.cpp
src/client/client.h
src/client/clientaliasmanager.cpp
src/client/clientaliasmanager.h
src/client/clientbacklogmanager.cpp
src/client/clientbacklogmanager.h
src/client/clientbufferviewconfig.cpp
src/client/clientbufferviewconfig.h
src/client/clientbufferviewmanager.cpp
src/client/clientbufferviewmanager.h
src/client/clientcoreinfo.cpp
src/client/clientcoreinfo.h
src/client/clientidentity.cpp
src/client/clientidentity.h
src/client/clientignorelistmanager.cpp
src/client/clientignorelistmanager.h
src/client/clientirclisthelper.cpp
src/client/clientirclisthelper.h
src/client/clientsettings.cpp
src/client/clientsettings.h
src/client/clientuserinputhandler.cpp
src/client/clientuserinputhandler.h
src/client/coreaccount.cpp
src/client/coreaccount.h
src/client/coreaccountmodel.cpp
src/client/coreaccountmodel.h
src/client/coreconnection.cpp
src/client/coreconnection.h
src/client/execwrapper.cpp
src/client/execwrapper.h
src/client/irclistmodel.cpp
src/client/irclistmodel.h
src/client/messagefilter.cpp
src/client/messagefilter.h
src/client/messagemodel.cpp
src/client/messagemodel.h
src/client/networkmodel.cpp
src/client/networkmodel.h
src/client/selectionmodelsynchronizer.cpp
src/client/selectionmodelsynchronizer.h
src/client/treemodel.cpp
src/client/treemodel.h
src/common/CMakeLists.txt
src/common/abstractcliparser.h
src/common/aliasmanager.cpp
src/common/aliasmanager.h
src/common/backlogmanager.cpp
src/common/backlogmanager.h
src/common/basichandler.cpp
src/common/basichandler.h
src/common/bufferinfo.cpp
src/common/bufferinfo.h
src/common/buffersyncer.cpp
src/common/buffersyncer.h
src/common/bufferviewconfig.cpp
src/common/bufferviewconfig.h
src/common/bufferviewmanager.cpp
src/common/bufferviewmanager.h
src/common/cliparser.cpp
src/common/cliparser.h
src/common/coreinfo.cpp
src/common/coreinfo.h
src/common/ctcpevent.cpp
src/common/ctcpevent.h
src/common/event.cpp
src/common/event.h
src/common/eventmanager.cpp
src/common/eventmanager.h
src/common/genversion.cpp
src/common/identity.cpp
src/common/identity.h
src/common/ignorelistmanager.cpp
src/common/ignorelistmanager.h
src/common/internalpeer.cpp [moved from src/common/internalconnection.cpp with 69% similarity]
src/common/internalpeer.h [moved from src/common/internalconnection.h with 79% similarity]
src/common/ircchannel.cpp
src/common/ircchannel.h
src/common/ircevent.cpp
src/common/ircevent.h
src/common/irclisthelper.cpp
src/common/irclisthelper.h
src/common/ircuser.cpp
src/common/ircuser.h
src/common/logbacktrace_unix.cpp
src/common/logbacktrace_win.cpp
src/common/logger.cpp
src/common/logger.h
src/common/mac_utils.cpp
src/common/mac_utils.h
src/common/main.cpp
src/common/message.cpp
src/common/message.h
src/common/messageevent.cpp
src/common/messageevent.h
src/common/network.cpp
src/common/network.h
src/common/networkconfig.cpp
src/common/networkconfig.h
src/common/networkevent.cpp
src/common/networkevent.h
src/common/protocol.h [new file with mode: 0644]
src/common/protocols/legacy/legacypeer.cpp [moved from src/common/protocols/legacy/legacyconnection.cpp with 84% similarity]
src/common/protocols/legacy/legacypeer.h [moved from src/common/protocols/legacy/legacyconnection.h with 76% similarity]
src/common/quassel.cpp
src/common/quassel.h
src/common/remotepeer.cpp [moved from src/common/remoteconnection.cpp with 82% similarity]
src/common/remotepeer.h [moved from src/common/remoteconnection.h with 72% similarity]
src/common/settings.cpp
src/common/settings.h
src/common/signalproxy.cpp
src/common/signalproxy.h
src/common/syncableobject.cpp
src/common/syncableobject.h
src/common/types.h
src/common/util.cpp
src/common/util.h
src/core/abstractsqlstorage.cpp
src/core/abstractsqlstorage.h
src/core/core.cpp
src/core/core.h
src/core/corealiasmanager.cpp
src/core/corealiasmanager.h
src/core/coreapplication.cpp
src/core/coreapplication.h
src/core/corebacklogmanager.cpp
src/core/corebacklogmanager.h
src/core/corebasichandler.cpp
src/core/corebasichandler.h
src/core/corebuffersyncer.cpp
src/core/corebuffersyncer.h
src/core/corebufferviewconfig.cpp
src/core/corebufferviewconfig.h
src/core/corebufferviewmanager.cpp
src/core/corebufferviewmanager.h
src/core/corecoreinfo.cpp
src/core/corecoreinfo.h
src/core/coreeventmanager.h
src/core/coreidentity.cpp
src/core/coreidentity.h
src/core/coreignorelistmanager.cpp
src/core/coreignorelistmanager.h
src/core/coreircchannel.cpp
src/core/coreircchannel.h
src/core/coreirclisthelper.cpp
src/core/coreirclisthelper.h
src/core/coreircuser.cpp
src/core/coreircuser.h
src/core/corenetwork.cpp
src/core/corenetwork.h
src/core/corenetworkconfig.cpp
src/core/corenetworkconfig.h
src/core/coresession.cpp
src/core/coresession.h
src/core/coresessioneventprocessor.cpp
src/core/coresessioneventprocessor.h
src/core/coresettings.cpp
src/core/coresettings.h
src/core/coreuserinputhandler.cpp
src/core/coreuserinputhandler.h
src/core/coreusersettings.cpp
src/core/coreusersettings.h
src/core/ctcpparser.cpp
src/core/ctcpparser.h
src/core/eventstringifier.cpp
src/core/eventstringifier.h
src/core/ircparser.cpp
src/core/ircparser.h
src/core/netsplit.cpp
src/core/netsplit.h
src/core/oidentdconfiggenerator.cpp
src/core/oidentdconfiggenerator.h
src/core/postgresqlstorage.cpp
src/core/postgresqlstorage.h
src/core/sessionthread.cpp
src/core/sessionthread.h
src/core/sqlitestorage.cpp
src/core/sqlitestorage.h
src/core/sslserver.cpp
src/core/sslserver.h
src/core/storage.cpp
src/core/storage.h
src/qtui/CMakeLists.txt
src/qtui/aboutdlg.cpp
src/qtui/aboutdlg.h
src/qtui/awaylogfilter.cpp
src/qtui/awaylogfilter.h
src/qtui/awaylogview.cpp
src/qtui/awaylogview.h
src/qtui/bufferwidget.cpp
src/qtui/bufferwidget.h
src/qtui/channellistdlg.cpp
src/qtui/channellistdlg.h
src/qtui/chatitem.cpp
src/qtui/chatitem.h
src/qtui/chatline.cpp
src/qtui/chatline.h
src/qtui/chatlinemodel.cpp
src/qtui/chatlinemodel.h
src/qtui/chatlinemodelitem.cpp
src/qtui/chatlinemodelitem.h
src/qtui/chatmonitorfilter.cpp
src/qtui/chatmonitorfilter.h
src/qtui/chatmonitorview.cpp
src/qtui/chatmonitorview.h
src/qtui/chatscene.cpp
src/qtui/chatscene.h
src/qtui/chatview.cpp
src/qtui/chatview.h
src/qtui/chatviewsearchbar.cpp
src/qtui/chatviewsearchbar.h
src/qtui/chatviewsearchcontroller.cpp
src/qtui/chatviewsearchcontroller.h
src/qtui/chatviewsettings.cpp
src/qtui/chatviewsettings.h
src/qtui/columnhandleitem.cpp
src/qtui/columnhandleitem.h
src/qtui/coreconfigwizard.cpp
src/qtui/coreconfigwizard.h
src/qtui/coreconnectdlg.cpp
src/qtui/coreconnectdlg.h
src/qtui/coreconnectionstatuswidget.cpp
src/qtui/coreconnectionstatuswidget.h
src/qtui/coreinfodlg.cpp
src/qtui/coreinfodlg.h
src/qtui/debugbufferviewoverlay.cpp
src/qtui/debugbufferviewoverlay.h
src/qtui/debugconsole.cpp
src/qtui/debugconsole.h
src/qtui/debuglogwidget.cpp
src/qtui/debuglogwidget.h
src/qtui/debugmessagemodelfilter.cpp
src/qtui/debugmessagemodelfilter.h
src/qtui/inputwidget.cpp
src/qtui/inputwidget.h
src/qtui/ircconnectionwizard.cpp
src/qtui/ircconnectionwizard.h
src/qtui/knotificationbackend.cpp
src/qtui/knotificationbackend.h
src/qtui/legacysystemtray.cpp
src/qtui/legacysystemtray.h
src/qtui/mainpage.cpp
src/qtui/mainpage.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/markerlineitem.cpp
src/qtui/markerlineitem.h
src/qtui/monoapplication.cpp
src/qtui/monoapplication.h
src/qtui/msgprocessorstatuswidget.cpp
src/qtui/msgprocessorstatuswidget.h
src/qtui/nicklistwidget.cpp
src/qtui/nicklistwidget.h
src/qtui/osxnotificationbackend.h [new file with mode: 0644]
src/qtui/osxnotificationbackend.mm [new file with mode: 0644]
src/qtui/phononnotificationbackend.cpp
src/qtui/phononnotificationbackend.h
src/qtui/qtui.cpp
src/qtui/qtui.h
src/qtui/qtuiapplication.cpp
src/qtui/qtuiapplication.h
src/qtui/qtuimessageprocessor.cpp
src/qtui/qtuimessageprocessor.h
src/qtui/qtuisettings.cpp
src/qtui/qtuisettings.h
src/qtui/qtuistyle.cpp
src/qtui/qtuistyle.h
src/qtui/settingsdlg.cpp
src/qtui/settingsdlg.h
src/qtui/settingspagedlg.cpp
src/qtui/settingspagedlg.h
src/qtui/settingspages/aliasesmodel.cpp
src/qtui/settingspages/aliasesmodel.h
src/qtui/settingspages/aliasessettingspage.cpp
src/qtui/settingspages/aliasessettingspage.h
src/qtui/settingspages/appearancesettingspage.cpp
src/qtui/settingspages/appearancesettingspage.h
src/qtui/settingspages/backlogsettingspage.cpp
src/qtui/settingspages/backlogsettingspage.h
src/qtui/settingspages/bufferviewsettingspage.cpp
src/qtui/settingspages/bufferviewsettingspage.h
src/qtui/settingspages/chatmonitorsettingspage.cpp
src/qtui/settingspages/chatmonitorsettingspage.h
src/qtui/settingspages/chatviewsettingspage.cpp
src/qtui/settingspages/chatviewsettingspage.h
src/qtui/settingspages/connectionsettingspage.cpp
src/qtui/settingspages/connectionsettingspage.h
src/qtui/settingspages/connectionsettingspage.ui
src/qtui/settingspages/coreaccountsettingspage.cpp
src/qtui/settingspages/coreaccountsettingspage.h
src/qtui/settingspages/coreconnectionsettingspage.cpp
src/qtui/settingspages/coreconnectionsettingspage.h
src/qtui/settingspages/highlightsettingspage.cpp
src/qtui/settingspages/highlightsettingspage.h
src/qtui/settingspages/identitiessettingspage.cpp
src/qtui/settingspages/identitiessettingspage.h
src/qtui/settingspages/identityeditwidget.cpp
src/qtui/settingspages/identityeditwidget.h
src/qtui/settingspages/ignorelistmodel.cpp
src/qtui/settingspages/ignorelistmodel.h
src/qtui/settingspages/ignorelistsettingspage.cpp
src/qtui/settingspages/ignorelistsettingspage.h
src/qtui/settingspages/inputwidgetsettingspage.cpp
src/qtui/settingspages/inputwidgetsettingspage.h
src/qtui/settingspages/itemviewsettingspage.cpp
src/qtui/settingspages/itemviewsettingspage.h
src/qtui/settingspages/keysequencewidget.cpp
src/qtui/settingspages/keysequencewidget.h
src/qtui/settingspages/networkssettingspage.cpp
src/qtui/settingspages/networkssettingspage.h
src/qtui/settingspages/networkssettingspage.ui
src/qtui/settingspages/notificationssettingspage.cpp
src/qtui/settingspages/notificationssettingspage.h
src/qtui/settingspages/previewbufferview.cpp
src/qtui/settingspages/previewbufferview.h
src/qtui/settingspages/shortcutsmodel.cpp
src/qtui/settingspages/shortcutsmodel.h
src/qtui/settingspages/shortcutssettingspage.cpp
src/qtui/settingspages/shortcutssettingspage.h
src/qtui/settingspages/topicwidgetsettingspage.cpp
src/qtui/settingspages/topicwidgetsettingspage.h
src/qtui/simplenetworkeditor.cpp
src/qtui/simplenetworkeditor.h
src/qtui/sslinfodlg.cpp
src/qtui/sslinfodlg.h
src/qtui/statusnotifieritem.cpp
src/qtui/statusnotifieritem.h
src/qtui/systemtray.cpp
src/qtui/systemtray.h
src/qtui/systraynotificationbackend.cpp
src/qtui/systraynotificationbackend.h
src/qtui/taskbarnotificationbackend.cpp
src/qtui/taskbarnotificationbackend.h
src/qtui/titlesetter.cpp
src/qtui/titlesetter.h
src/qtui/topicwidget.cpp
src/qtui/topicwidget.h
src/qtui/verticaldock.cpp
src/qtui/verticaldock.h
src/qtui/webpreviewitem.cpp
src/qtui/webpreviewitem.h
src/uisupport/abstractbuffercontainer.cpp
src/uisupport/abstractbuffercontainer.h
src/uisupport/abstractitemview.cpp
src/uisupport/abstractitemview.h
src/uisupport/abstractnotificationbackend.cpp
src/uisupport/abstractnotificationbackend.h
src/uisupport/action.cpp
src/uisupport/action.h
src/uisupport/actioncollection.cpp
src/uisupport/actioncollection.h
src/uisupport/bufferhotlistfilter.cpp
src/uisupport/bufferhotlistfilter.h
src/uisupport/bufferview.cpp
src/uisupport/bufferview.h
src/uisupport/bufferviewfilter.cpp
src/uisupport/bufferviewfilter.h
src/uisupport/bufferviewoverlayfilter.cpp
src/uisupport/bufferviewoverlayfilter.h
src/uisupport/clearablelineedit.cpp
src/uisupport/clearablelineedit.h
src/uisupport/clickable.cpp
src/uisupport/clickable.h
src/uisupport/clickablelabel.cpp
src/uisupport/clickablelabel.h
src/uisupport/colorbutton.cpp
src/uisupport/colorbutton.h
src/uisupport/contextmenuactionprovider.cpp
src/uisupport/contextmenuactionprovider.h
src/uisupport/flatproxymodel.cpp
src/uisupport/flatproxymodel.h
src/uisupport/fontselector.cpp
src/uisupport/fontselector.h
src/uisupport/graphicalui.cpp
src/uisupport/graphicalui.h
src/uisupport/icon.cpp
src/uisupport/icon.h
src/uisupport/iconloader.cpp
src/uisupport/iconloader.h
src/uisupport/kcmdlinewrapper.cpp
src/uisupport/kcmdlinewrapper.h
src/uisupport/multilineedit.cpp
src/uisupport/multilineedit.h
src/uisupport/networkmodelcontroller.cpp
src/uisupport/networkmodelcontroller.h
src/uisupport/nickview.cpp
src/uisupport/nickview.h
src/uisupport/nickviewfilter.cpp
src/uisupport/nickviewfilter.h
src/uisupport/qssparser.cpp
src/uisupport/qssparser.h
src/uisupport/resizingstackedwidget.cpp
src/uisupport/resizingstackedwidget.h
src/uisupport/settingspage.cpp
src/uisupport/settingspage.h
src/uisupport/styledlabel.cpp
src/uisupport/styledlabel.h
src/uisupport/tabcompleter.cpp
src/uisupport/tabcompleter.h
src/uisupport/toolbaractionprovider.cpp
src/uisupport/toolbaractionprovider.h
src/uisupport/uisettings.cpp
src/uisupport/uisettings.h
src/uisupport/uistyle.cpp
src/uisupport/uistyle.h

index 1bd917c..353511d 100644 (file)
@@ -30,9 +30,8 @@ project(QuasselIRC)
 include(CheckFunctionExists)
 include(CheckIncludeFile)
 
-# cmake 2.6.2 is required for KDE >=4.2 and should be widespread enough now
 # For building against Qt5, we check for an even newer cmake version below!
-cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.1 FATAL_ERROR)
 
 if(COMMAND cmake_policy)
    cmake_policy(SET CMP0003 NEW)
@@ -69,6 +68,7 @@ option(STATIC        "Enable static building (might not be portable)" OFF)
 
 if(APPLE)
   option(DEPLOY        "Mac OS X only! Adds required libs to bundle resources and create a dmg. Note: requires Qt to be built with 10.4u SDK" OFF)
+  option(WITH_NOTIFICATION_CENTER "Enable OS X Notification Center support" ON)
 endif(APPLE)
 
 # Default to embedding data in the static case
@@ -371,6 +371,15 @@ if(BUILD_GUI)
     set(INDICATEQT_LIBRARIES "")
   endif(WITH_LIBINDICATE AND NOT WITH_QT5)
 
+  # Setup OS X notification center support
+  if(WITH_NOTIFICATION_CENTER AND APPLE)
+    set(HAVE_NOTIFICATION_CENTER true)
+    add_definitions(-DHAVE_NOTIFICATION_CENTER)
+    set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES}
+      /System/Library/Frameworks/Foundation.framework
+    )
+  endif()
+
 endif(BUILD_GUI)
 
 # Core-only deps
index c0093c6..ccfc721 100644 (file)
@@ -28,6 +28,8 @@
        <true/>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
+       <key>NSHighResolutionCapable</key>
+       <true/>
        <key>NSHumanReadableCopyright</key>
        <string>© 2005-2012, Quassel IRC Team</string>
 </dict>
index 13a2023..b5fe954 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8d5f5d6..5a228a2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 95b9ee1..5657d79 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 44b0bf3..7730c64 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a512d0d..32bd887 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 14ea1e7..991ea8a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d0c6d30..30335ae 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 747325d..2900403 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c1567a0..38a88f6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b29e42e..c940c57 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 572f3e1..15c690a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3fca89a..8356022 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index da61b6e..6be157a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7b94d93..fe49f77 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ec87b8a..460bede 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 224df42..29daabd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d11c61b..8fd0261 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d3f4b7a..8cf96c3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f341d77..c526e99 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 578ad49..474828a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 06205ef..857c307 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 98db62c..7f7cda1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 63a20a0..57d2655 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1a871d8..708ab44 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 75e3a41..3b72c45 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 671a587..eb64a12 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 02dcd33..1543d31 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 85cbabe..02a4e23 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5174dfb..557c57a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index faf25f8..3e7a4bd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 708fa14..54c76ff 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4e3fd16..b00f6b2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f2434a2..d2c3c4d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e4a0f40..a8c62fc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4065408..88f456c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 37ee473..237ae70 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c33afdf..6da6734 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0695574..3373346 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2527007..24aeffd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index eeaa5e2..fb553fe 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include "clientsettings.h"
 #include "coreaccountmodel.h"
 #include "identity.h"
-#include "internalconnection.h"
+#include "internalpeer.h"
 #include "network.h"
 #include "networkmodel.h"
 #include "quassel.h"
 #include "signalproxy.h"
 #include "util.h"
 
-#include "protocols/legacy/legacyconnection.h"
+#include "protocols/legacy/legacypeer.h"
 
 CoreConnection::CoreConnection(CoreAccountModel *model, QObject *parent)
     : QObject(parent),
@@ -123,7 +123,7 @@ void CoreConnection::updateProgress(int value, int max)
 
 void CoreConnection::reconnectTimeout()
 {
-    if (!_connection) {
+    if (!_peer) {
         CoreConnectionSettings s;
         if (_wantReconnect && s.autoReconnect()) {
 #ifdef HAVE_KDE
@@ -201,7 +201,7 @@ void CoreConnection::solidNetworkStatusChanged(Solid::Networking::Status status)
 
 bool CoreConnection::isEncrypted() const
 {
-    return _connection && _connection->isSecure();
+    return _peer && _peer->isSecure();
 }
 
 
@@ -211,7 +211,7 @@ bool CoreConnection::isLocalConnection() const
         return false;
     if (currentAccount().isInternal())
         return true;
-    if (_connection->isLocal())
+    if (_peer->isLocal())
         return true;
 
     return false;
@@ -331,10 +331,10 @@ void CoreConnection::coreHasData(const QVariant &item)
         // if the connection is an orphan, the signalProxy adopts it.
         // -> we don't need to care about it anymore
 
-        disconnect(_connection, 0, this, 0);
+        disconnect(_peer, 0, this, 0);
 
-        _connection->setParent(0);
-        Client::signalProxy()->addPeer(_connection);
+        _peer->setParent(0);
+        Client::signalProxy()->addPeer(_peer);
 
         sessionStateReceived(msg["SessionState"].toMap());
     }
@@ -378,15 +378,15 @@ void CoreConnection::resetConnection(bool wantReconnect)
 
     _wantReconnect = wantReconnect;
 
-    if (_connection) {
+    if (_peer) {
         disconnect(_socket, 0, this, 0);
-        disconnect(_connection, 0, this, 0);
-        _connection->close();
+        disconnect(_peer, 0, this, 0);
+        _peer->close();
 
-        if (_connection->parent() == this)
-            _connection->deleteLater(); // if it's not us, it belongs to the sigproxy which will delete it
+        if (_peer->parent() == this)
+            _peer->deleteLater(); // if it's not us, it belongs to the sigproxy which will delete it
         _socket = 0;      // socket is owned and will be deleted by RemoteConnection
-        _connection = 0;
+        _peer = 0;
     }
     else if (_socket) {
         disconnect(_socket, 0, this, 0);
@@ -475,9 +475,9 @@ void CoreConnection::connectToCurrentAccount()
         }
         emit startInternalCore();
 
-        InternalConnection *conn = new InternalConnection();
-        Client::instance()->signalProxy()->addPeer(conn); // sigproxy will take ownership
-        emit connectToInternalCore(conn);
+        InternalPeer *peer = new InternalPeer();
+        Client::instance()->signalProxy()->addPeer(peer); // sigproxy will take ownership
+        emit connectToInternalCore(peer);
 
         return;
     }
@@ -525,10 +525,10 @@ void CoreConnection::connectToCurrentAccount()
 void CoreConnection::coreSocketConnected()
 {
     // Create the connection which will handle the incoming data
-    Q_ASSERT(!_connection);
-    _connection = new LegacyConnection(_socket, this);
-    connect(_connection, SIGNAL(dataReceived(QVariant)), SLOT(coreHasData(QVariant)));
-    connect(_connection, SIGNAL(transferProgress(int,int)), SLOT(updateProgress(int,int)));
+    Q_ASSERT(!_peer);
+    _peer = new LegacyPeer(_socket, this);
+    connect(_peer, SIGNAL(dataReceived(QVariant)), SLOT(coreHasData(QVariant)));
+    connect(_peer, SIGNAL(transferProgress(int,int)), SLOT(updateProgress(int,int)));
 
     // Phase One: Send client info and wait for core info
 
@@ -546,7 +546,7 @@ void CoreConnection::coreSocketConnected()
     clientInit["UseCompression"] = false;
 #endif
 
-    qobject_cast<RemoteConnection *>(_connection)->writeSocketData(clientInit);
+    qobject_cast<RemotePeer *>(_peer)->writeSocketData(clientInit);
 }
 
 
@@ -695,7 +695,7 @@ void CoreConnection::loginToCore(const QString &prevError)
     clientLogin["MsgType"] = "ClientLogin";
     clientLogin["User"] = currentAccount().user();
     clientLogin["Password"] = currentAccount().password();
-    qobject_cast<RemoteConnection*>(_connection)->writeSocketData(clientLogin);
+    qobject_cast<RemotePeer*>(_peer)->writeSocketData(clientLogin);
 }
 
 
@@ -809,5 +809,5 @@ void CoreConnection::doCoreSetup(const QVariant &setupData)
     QVariantMap setup;
     setup["MsgType"] = "CoreSetupData";
     setup["SetupData"] = setupData;
-    qobject_cast<RemoteConnection *>(_connection)->writeSocketData(setup);
+    qobject_cast<RemotePeer *>(_peer)->writeSocketData(setup);
 }
index dcc914e..836d8cc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #endif
 
 #include "coreaccount.h"
-#include "remoteconnection.h"
+#include "remotepeer.h"
 #include "types.h"
 
 class CoreAccountModel;
-class InternalConnection;
+class InternalPeer;
 class Network;
 class SignalProxy;
 
@@ -107,7 +107,7 @@ signals:
     void coreSetupFailed(const QString &error);
 
     void startInternalCore();
-    void connectToInternalCore(InternalConnection *connection);
+    void connectToInternalCore(InternalPeer *connection);
 
     // These signals MUST be handled synchronously!
     void userAuthenticationRequired(CoreAccount *, bool *valid, const QString &errorMessage = QString());
@@ -176,7 +176,7 @@ private:
     QVariantMap _coreMsgBuffer;
 
     QPointer<QTcpSocket> _socket;
-    QPointer<SignalProxy::AbstractPeer> _connection;
+    QPointer<SignalProxy::AbstractPeer> _peer;
     ConnectionState _state;
 
     QTimer _reconnectTimer;
index fd1e8c1..5adc459 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d7aa5c4..9189516 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b3ca23d..349ff72 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 38179be..9c25bd0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 241ad0f..a9d8a7d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 089e0a2..26a3e34 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c0a633c..b09a456 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8a3c828..04e169a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 51a6af6..1a2da5e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0cd97cd..f0d4c02 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5494ed2..5f22e4a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e6f08eb..c40cc5c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e481ea8..05c9e5b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2677533..574dc6a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7bdf1c5..c247eb3 100644 (file)
@@ -17,7 +17,7 @@ set(SOURCES
     eventmanager.cpp
     identity.cpp
     ignorelistmanager.cpp
-    internalconnection.cpp
+    internalpeer.cpp
     ircchannel.cpp
     ircevent.cpp
     irclisthelper.cpp
@@ -29,13 +29,13 @@ set(SOURCES
     networkconfig.cpp
     networkevent.cpp
     quassel.cpp
-    remoteconnection.cpp
+    remotepeer.cpp
     settings.cpp
     signalproxy.cpp
     syncableobject.cpp
     util.cpp
 
-    protocols/legacy/legacyconnection.cpp
+    protocols/legacy/legacypeer.cpp
 )
 
 set(MOC_HDRS
@@ -49,18 +49,18 @@ set(MOC_HDRS
     eventmanager.h
     identity.h
     ignorelistmanager.h
-    internalconnection.h
+    internalpeer.h
     ircchannel.h
     irclisthelper.h
     ircuser.h
     network.h
     networkconfig.h
-    remoteconnection.h
+    remotepeer.h
     settings.h
     signalproxy.h
     syncableobject.h
 
-    protocols/legacy/legacyconnection.h
+    protocols/legacy/legacypeer.h
 )
 
 set(HEADERS ${MOC_HDRS}
@@ -74,6 +74,7 @@ set(HEADERS ${MOC_HDRS}
     networkevent.h
     logger.h
     message.h
+    protocol.h
     types.h
     util.h)
 
index c4b6ada..bce6ef4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f4f458e..d4e02a2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -102,6 +102,7 @@ AliasManager::AliasList AliasManager::defaults()
             << Alias("chanserv",  "/msg chanserv $0")
             << Alias("hs", "/msg hostserv $0")
             << Alias("hostserv", "/msg hostserv $0")
+            << Alias("wii", "/whois $0 $0")
             << Alias("back", "/quote away");
 
 #ifdef Q_OS_LINUX
index 9c17f79..a5646d8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 64dab66..c452756 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6c0dadb..9d11a32 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b705d55..341b729 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 827e74a..663f487 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ae569ef..da013e3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 22bf933..c816a8b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b685f08..5fdc34c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index de0b50e..99a9084 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2fff951..3607d0f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5b506e5..6d02452 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 01529df..bae7fe4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fcc0120..bf3f95f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ffaee23..30d9891 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a0b4fa9..dc8528a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f32a5a8..2d35f42 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 506af59..16df957 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2524ff2..099627b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 91e7bbb..54e26ec 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 157460e..4b916e5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 23aaa10..1abe0fa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ca1a95f..370f3a3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1241149..edebe61 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a939e9e..64a1da6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b718110..afdff7d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 12e5677..4de9875 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2e9316b..9205291 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fabded7..efa007f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
similarity index 69%
rename from src/common/internalconnection.cpp
rename to src/common/internalpeer.cpp
index a194a03..15e67ed 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include <QCoreApplication>
 #include <QThread>
 
-#include "internalconnection.h"
+#include "internalpeer.h"
+
+using namespace Protocol;
 
 template<class T>
 class PeerMessageEvent : public QEvent
 {
 public:
-    PeerMessageEvent(InternalConnection *sender, InternalConnection::EventType eventType, const T &message)
+    PeerMessageEvent(InternalPeer *sender, InternalPeer::EventType eventType, const T &message)
     : QEvent(QEvent::Type(eventType)), sender(sender), message(message) {}
-    InternalConnection *sender;
+    InternalPeer *sender;
     T message;
 };
 
 
-InternalConnection::InternalConnection(QObject *parent)
+InternalPeer::InternalPeer(QObject *parent)
     : SignalProxy::AbstractPeer(parent),
     _proxy(0),
     _peer(0),
@@ -44,38 +46,38 @@ InternalConnection::InternalConnection(QObject *parent)
 }
 
 
-InternalConnection::~InternalConnection()
+InternalPeer::~InternalPeer()
 {
     if (_isOpen)
         emit disconnected();
 }
 
 
-QString InternalConnection::description() const
+QString InternalPeer::description() const
 {
     return tr("internal connection");
 }
 
 
-bool InternalConnection::isOpen() const
+bool InternalPeer::isOpen() const
 {
     return true;
 }
 
 
-bool InternalConnection::isSecure() const
+bool InternalPeer::isSecure() const
 {
     return true;
 }
 
 
-bool InternalConnection::isLocal() const
+bool InternalPeer::isLocal() const
 {
     return true;
 }
 
 
-void InternalConnection::close(const QString &reason)
+void InternalPeer::close(const QString &reason)
 {
     // FIXME
     Q_UNUSED(reason)
@@ -83,13 +85,13 @@ void InternalConnection::close(const QString &reason)
 }
 
 
-int InternalConnection::lag() const
+int InternalPeer::lag() const
 {
     return 0;
 }
 
 
-void InternalConnection::setSignalProxy(SignalProxy *proxy)
+void InternalPeer::setSignalProxy(::SignalProxy *proxy)
 {
     if (!proxy && _proxy) {
         _proxy = 0;
@@ -109,7 +111,7 @@ void InternalConnection::setSignalProxy(SignalProxy *proxy)
 }
 
 
-void InternalConnection::setPeer(InternalConnection *peer)
+void InternalPeer::setPeer(InternalPeer *peer)
 {
     if (_peer) {
         qWarning() << Q_FUNC_INFO << "Peer already set, ignoring!";
@@ -120,7 +122,7 @@ void InternalConnection::setPeer(InternalConnection *peer)
 }
 
 
-void InternalConnection::peerDisconnected()
+void InternalPeer::peerDisconnected()
 {
     disconnect(_peer, 0, this, 0);
     _peer = 0;
@@ -131,32 +133,32 @@ void InternalConnection::peerDisconnected()
 }
 
 
-void InternalConnection::dispatch(const SignalProxy::SyncMessage &msg)
+void InternalPeer::dispatch(const SyncMessage &msg)
 {
     dispatch(SyncMessageEvent, msg);
 }
 
 
-void InternalConnection::dispatch(const SignalProxy::RpcCall &msg)
+void InternalPeer::dispatch(const RpcCall &msg)
 {
     dispatch(RpcCallEvent, msg);
 }
 
 
-void InternalConnection::dispatch(const SignalProxy::InitRequest &msg)
+void InternalPeer::dispatch(const InitRequest &msg)
 {
     dispatch(InitRequestEvent, msg);
 }
 
 
-void InternalConnection::dispatch(const SignalProxy::InitData &msg)
+void InternalPeer::dispatch(const InitData &msg)
 {
     dispatch(InitDataEvent, msg);
 }
 
 
 template<class T>
-void InternalConnection::dispatch(EventType eventType, const T &msg)
+void InternalPeer::dispatch(EventType eventType, const T &msg)
 {
     if (!_peer) {
         qWarning() << Q_FUNC_INFO << "Cannot dispatch a message without a peer!";
@@ -171,7 +173,7 @@ void InternalConnection::dispatch(EventType eventType, const T &msg)
 
 
 template<class T>
-void InternalConnection::handle(const T &msg)
+void InternalPeer::handle(const T &msg)
 {
     if (!_proxy) {
         qWarning() << Q_FUNC_INFO << "Cannot handle a message without having a signal proxy set!";
@@ -182,26 +184,26 @@ void InternalConnection::handle(const T &msg)
 }
 
 
-void InternalConnection::customEvent(QEvent *event)
+void InternalPeer::customEvent(QEvent *event)
 {
     switch ((int)event->type()) {
         case SyncMessageEvent: {
-            PeerMessageEvent<SignalProxy::SyncMessage> *e = static_cast<PeerMessageEvent<SignalProxy::SyncMessage> *>(event);
+            PeerMessageEvent<SyncMessage> *e = static_cast<PeerMessageEvent<SyncMessage> *>(event);
             handle(e->message);
             break;
         }
         case RpcCallEvent: {
-            PeerMessageEvent<SignalProxy::RpcCall> *e = static_cast<PeerMessageEvent<SignalProxy::RpcCall> *>(event);
+            PeerMessageEvent<RpcCall> *e = static_cast<PeerMessageEvent<RpcCall> *>(event);
             handle(e->message);
             break;
         }
         case InitRequestEvent: {
-            PeerMessageEvent<SignalProxy::InitRequest> *e = static_cast<PeerMessageEvent<SignalProxy::InitRequest> *>(event);
+            PeerMessageEvent<InitRequest> *e = static_cast<PeerMessageEvent<InitRequest> *>(event);
             handle(e->message);
             break;
         }
         case InitDataEvent: {
-            PeerMessageEvent<SignalProxy::InitData> *e = static_cast<PeerMessageEvent<SignalProxy::InitData> *>(event);
+            PeerMessageEvent<InitData> *e = static_cast<PeerMessageEvent<InitData> *>(event);
             handle(e->message);
             break;
         }
similarity index 79%
rename from src/common/internalconnection.h
rename to src/common/internalpeer.h
index 31f3756..4c82ceb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef INTERNALCONNECTION_H
-#define INTERNALCONNECTION_H
+#ifndef INTERNALPEER_H
+#define INTERNALPEER_H
 
 #include <QTcpSocket>
 
+#include "protocol.h"
 #include "signalproxy.h"
 
 class QEvent;
 
-class InternalConnection : public SignalProxy::AbstractPeer
+class InternalPeer : public SignalProxy::AbstractPeer
 {
     Q_OBJECT
 
@@ -39,16 +40,16 @@ public:
         InitDataEvent
     };
 
-    InternalConnection(QObject *parent = 0);
-    virtual ~InternalConnection();
+    InternalPeer(QObject *parent = 0);
+    virtual ~InternalPeer();
 
     QString description() const;
 
     SignalProxy *signalProxy() const;
     void setSignalProxy(SignalProxy *proxy);
 
-    InternalConnection *peer() const;
-    void setPeer(InternalConnection *peer);
+    InternalPeer *peer() const;
+    void setPeer(InternalPeer *peer);
 
     bool isOpen() const;
     bool isSecure() const;
@@ -56,10 +57,10 @@ public:
 
     int lag() const;
 
-    void dispatch(const SignalProxy::SyncMessage &msg);
-    void dispatch(const SignalProxy::RpcCall &msg);
-    void dispatch(const SignalProxy::InitRequest &msg);
-    void dispatch(const SignalProxy::InitData &msg);
+    void dispatch(const Protocol::SyncMessage &msg);
+    void dispatch(const Protocol::RpcCall &msg);
+    void dispatch(const Protocol::InitRequest &msg);
+    void dispatch(const Protocol::InitData &msg);
 
 public slots:
     void close(const QString &reason = QString());
@@ -84,7 +85,7 @@ private:
 
 private:
     SignalProxy *_proxy;
-    InternalConnection *_peer;
+    InternalPeer *_peer;
     bool _isOpen;
 };
 
index 4acc23a..3fc3461 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f2a716f..c0ee070 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 26b8b6a..c002a97 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b950136..a9d7880 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 42b0c3f..ed0e431 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 18c71a6..87def60 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4d5f572..b9f359e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index daa59e5..3ff272d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index eae97dc..11e2550 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7b79588..7d552c9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 97783fb..8e35dca 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 9a56130..ea5b01b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2ceb705..49d9a2d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 09394da..90e5f58 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index eafb159..c0ffabf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b075914..f4016f5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5be33fb..5125c66 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b9db573..0efb85c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b9bcdc5..b18225b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4ce07fe..170069a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b83c699..5b24fbf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4c60d3a..066988f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -29,7 +29,8 @@ NetworkConfig::NetworkConfig(const QString &objectName, QObject *parent)
     _autoWhoEnabled(true),
     _autoWhoInterval(90),
     _autoWhoNickLimit(200),
-    _autoWhoDelay(5)
+    _autoWhoDelay(5),
+    _standardCtcp(false)
 {
 }
 
@@ -107,3 +108,14 @@ void NetworkConfig::setAutoWhoDelay(int delay)
     SYNC(ARG(delay))
     emit autoWhoDelaySet(delay);
 }
+
+
+void NetworkConfig::setStandardCtcp(bool enabled)
+{
+    if (_standardCtcp == enabled)
+        return;
+
+    _standardCtcp = enabled;
+    SYNC(ARG(enabled))
+    emit standardCtcpSet(enabled);
+}
index 4c6adba..ae121aa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -35,6 +35,7 @@ class NetworkConfig : public SyncableObject
     Q_PROPERTY(int autoWhoInterval READ autoWhoInterval WRITE setAutoWhoInterval)
     Q_PROPERTY(int autoWhoNickLimit READ autoWhoNickLimit WRITE setAutoWhoNickLimit)
     Q_PROPERTY(int autoWhoDelay READ autoWhoDelay WRITE setAutoWhoDelay)
+    Q_PROPERTY(bool standardCtcp READ standardCtcp WRITE setStandardCtcp)
 
 public :
         NetworkConfig(const QString &objectName = "GlobalNetworkConfig", QObject *parent = 0);
@@ -70,6 +71,10 @@ public slots:
     void setAutoWhoDelay(int);
     virtual inline void requestSetAutoWhoDelay(int i) { REQUEST(ARG(i)) }
 
+    inline bool standardCtcp() const { return _standardCtcp; }
+    void setStandardCtcp(bool);
+    virtual inline void requestSetStandardCtcp(bool b) { REQUEST(ARG(b)) }
+
 signals:
     void pingTimeoutEnabledSet(bool);
     void pingIntervalSet(int);
@@ -78,6 +83,7 @@ signals:
     void autoWhoIntervalSet(int);
 //   void autoWhoNickLimitSet(int);
     void autoWhoDelaySet(int);
+    void standardCtcpSet(bool);
 
 //   void setPingTimeoutEnabledRequested(bool);
 //   void setPingIntervalRequested(int);
@@ -96,6 +102,8 @@ private:
     int _autoWhoInterval;
     int _autoWhoNickLimit;
     int _autoWhoDelay;
+
+    bool _standardCtcp;
 };
 
 
index 80b1532..ec8947b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b55a925..3bad605 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/src/common/protocol.h b/src/common/protocol.h
new file mode 100644 (file)
index 0000000..af98b8b
--- /dev/null
@@ -0,0 +1,128 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef PROTOCOL_H_
+#define PROTOCOL_H_
+
+#include <QByteArray>
+#include <QDateTime>
+#include <QVariantList>
+
+namespace Protocol {
+
+/*** handled by SignalProxy ***/
+
+class SyncMessage
+{
+public:
+    inline SyncMessage(const QByteArray &className, const QString &objectName, const QByteArray &slotName, const QVariantList &params)
+    : _className(className), _objectName(objectName), _slotName(slotName), _params(params) {}
+
+    inline QByteArray className() const { return _className; }
+    inline QString objectName() const { return _objectName; }
+    inline QByteArray slotName() const { return _slotName; }
+
+    inline QVariantList params() const { return _params; }
+
+private:
+    QByteArray _className;
+    QString _objectName;
+    QByteArray _slotName;
+    QVariantList _params;
+};
+
+
+class RpcCall
+{
+public:
+    inline RpcCall(const QByteArray &slotName, const QVariantList &params)
+    : _slotName(slotName), _params(params) {}
+
+    inline QByteArray slotName() const { return _slotName; }
+    inline QVariantList params() const { return _params; }
+
+private:
+    QByteArray _slotName;
+    QVariantList _params;
+};
+
+
+class InitRequest
+{
+public:
+    inline InitRequest(const QByteArray &className, const QString &objectName)
+    : _className(className), _objectName(objectName) {}
+
+    inline QByteArray className() const { return _className; }
+    inline QString objectName() const { return _objectName; }
+
+private:
+    QByteArray _className;
+    QString _objectName;
+};
+
+
+class InitData
+{
+public:
+    inline InitData(const QByteArray &className, const QString &objectName, const QVariantMap &initData)
+    : _className(className), _objectName(objectName), _initData(initData) {}
+
+    inline QByteArray className() const { return _className; }
+    inline QString objectName() const { return _objectName; }
+
+    inline QVariantMap initData() const { return _initData; }
+
+private:
+    QByteArray _className;
+    QString _objectName;
+    QVariantMap _initData;
+};
+
+
+/*** handled by RemoteConnection ***/
+
+class HeartBeat
+{
+public:
+    inline HeartBeat(const QDateTime &timestamp) : _timestamp(timestamp) {}
+
+    inline QDateTime timestamp() const { return _timestamp; }
+
+private:
+    QDateTime _timestamp;
+};
+
+
+class HeartBeatReply
+{
+public:
+    inline HeartBeatReply(const QDateTime &timestamp) : _timestamp(timestamp) {}
+
+    inline QDateTime timestamp() const { return _timestamp; }
+
+private:
+    QDateTime _timestamp;
+};
+
+
+};
+
+#endif
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#include "legacyconnection.h"
+#include "legacypeer.h"
 
-LegacyConnection::LegacyConnection(QTcpSocket *socket, QObject *parent)
-    : RemoteConnection(socket, parent),
+using namespace Protocol;
+
+LegacyPeer::LegacyPeer(QTcpSocket *socket, QObject *parent)
+    : RemotePeer(socket, parent),
     _blockSize(0),
     _useCompression(false)
 {
@@ -32,9 +34,9 @@ LegacyConnection::LegacyConnection(QTcpSocket *socket, QObject *parent)
 }
 
 
-void LegacyConnection::setSignalProxy(SignalProxy *proxy)
+void LegacyPeer::setSignalProxy(::SignalProxy *proxy)
 {
-    RemoteConnection::setSignalProxy(proxy);
+    RemotePeer::setSignalProxy(proxy);
 
     if (proxy) {
         // enable compression now if requested - the initial handshake is uncompressed in the legacy protocol!
@@ -44,7 +46,7 @@ void LegacyConnection::setSignalProxy(SignalProxy *proxy)
 }
 
 
-void LegacyConnection::socketDataAvailable()
+void LegacyPeer::socketDataAvailable()
 {
     QVariant item;
     while (readSocketData(item)) {
@@ -57,7 +59,7 @@ void LegacyConnection::socketDataAvailable()
 }
 
 
-bool LegacyConnection::readSocketData(QVariant &item)
+bool LegacyPeer::readSocketData(QVariant &item)
 {
     if (_blockSize == 0) {
         if (socket()->bytesAvailable() < 4)
@@ -116,7 +118,7 @@ bool LegacyConnection::readSocketData(QVariant &item)
 }
 
 
-void LegacyConnection::writeSocketData(const QVariant &item)
+void LegacyPeer::writeSocketData(const QVariant &item)
 {
     if (!socket()->isOpen()) {
         qWarning() << Q_FUNC_INFO << "Can't write to a closed socket!";
@@ -145,7 +147,7 @@ void LegacyConnection::writeSocketData(const QVariant &item)
 }
 
 
-void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
+void LegacyPeer::handlePackedFunc(const QVariant &packedFunc)
 {
     QVariantList params(packedFunc.toList());
 
@@ -164,7 +166,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
             QByteArray className = params.takeFirst().toByteArray();
             QString objectName = params.takeFirst().toString();
             QByteArray slotName = params.takeFirst().toByteArray();
-            handle(SignalProxy::SyncMessage(className, objectName, slotName, params));
+            handle(Protocol::SyncMessage(className, objectName, slotName, params));
             break;
         }
         case RpcCall: {
@@ -173,7 +175,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
                 return;
             }
             QByteArray slotName = params.takeFirst().toByteArray();
-            handle(SignalProxy::RpcCall(slotName, params));
+            handle(Protocol::RpcCall(slotName, params));
             break;
         }
         case InitRequest: {
@@ -183,7 +185,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
             }
             QByteArray className = params[0].toByteArray();
             QString objectName = params[1].toString();
-            handle(SignalProxy::InitRequest(className, objectName));
+            handle(Protocol::InitRequest(className, objectName));
             break;
         }
         case InitData: {
@@ -194,7 +196,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
             QByteArray className = params[0].toByteArray();
             QString objectName = params[1].toString();
             QVariantMap initData = params[2].toMap();
-            handle(SignalProxy::InitData(className, objectName, initData));
+            handle(Protocol::InitData(className, objectName, initData));
             break;
         }
         case HeartBeat: {
@@ -206,7 +208,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
             // so we assume it's sent today, which works in exactly the same cases as it did in the old implementation
             QDateTime dateTime = QDateTime::currentDateTimeUtc();
             dateTime.setTime(params[0].toTime());
-            handle(RemoteConnection::HeartBeat(dateTime));
+            handle(Protocol::HeartBeat(dateTime));
             break;
         }
         case HeartBeatReply: {
@@ -218,7 +220,7 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
             // so we assume it's sent today, which works in exactly the same cases as it did in the old implementation
             QDateTime dateTime = QDateTime::currentDateTimeUtc();
             dateTime.setTime(params[0].toTime());
-            handle(RemoteConnection::HeartBeatReply(dateTime));
+            handle(Protocol::HeartBeatReply(dateTime));
             break;
         }
 
@@ -226,43 +228,43 @@ void LegacyConnection::handlePackedFunc(const QVariant &packedFunc)
 }
 
 
-void LegacyConnection::dispatch(const SignalProxy::SyncMessage &msg)
+void LegacyPeer::dispatch(const Protocol::SyncMessage &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)Sync << msg.className() << msg.objectName() << msg.slotName() << msg.params());
 }
 
 
-void LegacyConnection::dispatch(const SignalProxy::RpcCall &msg)
+void LegacyPeer::dispatch(const Protocol::RpcCall &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)RpcCall << msg.slotName() << msg.params());
 }
 
 
-void LegacyConnection::dispatch(const SignalProxy::InitRequest &msg)
+void LegacyPeer::dispatch(const Protocol::InitRequest &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)InitRequest << msg.className() << msg.objectName());
 }
 
 
-void LegacyConnection::dispatch(const SignalProxy::InitData &msg)
+void LegacyPeer::dispatch(const Protocol::InitData &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)InitData << msg.className() << msg.objectName() << msg.initData());
 }
 
 
-void LegacyConnection::dispatch(const RemoteConnection::HeartBeat &msg)
+void LegacyPeer::dispatch(const Protocol::HeartBeat &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)HeartBeat << msg.timestamp().time());
 }
 
 
-void LegacyConnection::dispatch(const RemoteConnection::HeartBeatReply &msg)
+void LegacyPeer::dispatch(const Protocol::HeartBeatReply &msg)
 {
     dispatchPackedFunc(QVariantList() << (qint16)HeartBeatReply << msg.timestamp().time());
 }
 
 
-void LegacyConnection::dispatchPackedFunc(const QVariantList &packedFunc)
+void LegacyPeer::dispatchPackedFunc(const QVariantList &packedFunc)
 {
     writeSocketData(QVariant(packedFunc));
 }
similarity index 76%
rename from src/common/protocols/legacy/legacyconnection.h
rename to src/common/protocols/legacy/legacypeer.h
index c05ce51..a3aa178 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef LEGACYCONNECTION_H
-#define LEGACYCONNECTION_H
+#ifndef LEGACYPEER_H
+#define LEGACYPEER_H
 
 #include <QDataStream>
 
-#include "../../remoteconnection.h"
+#include "../../remotepeer.h"
 
 class QDataStream;
 
-class LegacyConnection : public RemoteConnection
+class LegacyPeer : public RemotePeer
 {
     Q_OBJECT
 
@@ -41,18 +41,18 @@ public:
         HeartBeatReply
     };
 
-    LegacyConnection(QTcpSocket *socket, QObject *parent = 0);
-    ~LegacyConnection() {}
+    LegacyPeer(QTcpSocket *socket, QObject *parent = 0);
+    ~LegacyPeer() {}
 
     void setSignalProxy(SignalProxy *proxy);
 
-    void dispatch(const SignalProxy::SyncMessage &msg);
-    void dispatch(const SignalProxy::RpcCall &msg);
-    void dispatch(const SignalProxy::InitRequest &msg);
-    void dispatch(const SignalProxy::InitData &msg);
+    void dispatch(const Protocol::SyncMessage &msg);
+    void dispatch(const Protocol::RpcCall &msg);
+    void dispatch(const Protocol::InitRequest &msg);
+    void dispatch(const Protocol::InitData &msg);
 
-    void dispatch(const RemoteConnection::HeartBeat &msg);
-    void dispatch(const RemoteConnection::HeartBeatReply &msg);
+    void dispatch(const Protocol::HeartBeat &msg);
+    void dispatch(const Protocol::HeartBeatReply &msg);
 
     // FIXME: this is only used for the auth phase and should be replaced by something more generic
     void writeSocketData(const QVariant &item);
index 89470d5..c60f5ec 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -40,6 +40,7 @@
 #include "bufferinfo.h"
 #include "types.h"
 #include "syncableobject.h"
+#include "logger.h"
 
 Quassel::BuildInfo Quassel::_buildInfo;
 AbstractCliParser *Quassel::_cliParser = 0;
@@ -494,10 +495,32 @@ void Quassel::loadTranslation(const QLocale &locale)
     quasselTranslator->setObjectName("QuasselTr");
     qApp->installTranslator(quasselTranslator);
 
-    QLocale::setDefault(locale);
+#if QT_VERSION >= 0x040800
+    bool success = qtTranslator->load(locale, QString("qt_%1"), translationDirPath());
+    if (!success)
+        qtTranslator->load(locale, QString("qt_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+    quasselTranslator->load(locale, QString(""), translationDirPath());
+#else
+    QString localeName = locale.name();
+
+    // if the user did not specify a language in the settings, the system locale
+    // is used, but Qt < 4.8 does not respect language settings. This bit is
+    // based on QLocale::uiLanguages() as in Qt 4.8.3
+    if (locale == QLocale::system()) {
+        // FIXME: does it make sense to set the locale to the system locale?
+        QLocale::setDefault(locale);
+        QVariant res = QSystemLocale().query(QSystemLocale::UILanguages, QVariant());
+        if (!res.isNull()) {
+            QString newName = res.toStringList()[0];
+            if (!newName.isEmpty()) {
+                localeName = newName.replace('-', "_"); // silly Qt.
+            }
+        }
+    }
 
-    bool success = qtTranslator->load(QString("qt_%1").arg(locale.name()), translationDirPath());
+    bool success = qtTranslator->load(QString("qt_%1").arg(localeName), translationDirPath());
     if (!success)
-        qtTranslator->load(QString("qt_%1").arg(locale.name()), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
-    quasselTranslator->load(QString("%1").arg(locale.name()), translationDirPath());
+        qtTranslator->load(QString("qt_%1").arg(localeName), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+    quasselTranslator->load(QString("%1").arg(localeName), translationDirPath());
+#endif
 }
index e070bae..6089ac0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -71,8 +71,9 @@ public:
     enum Feature {
         SynchronizedMarkerLine = 0x0001,
         SaslAuthentication = 0x0002,
+        SaslExternal = 0x0004,
 
-        NumFeatures = 0x0002
+        NumFeatures = 0x0004
     };
     Q_DECLARE_FLAGS(Features, Feature);
 
similarity index 82%
rename from src/common/remoteconnection.cpp
rename to src/common/remotepeer.cpp
index 4b73768..e33f56a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #  include <QSslSocket>
 #endif
 
-#include "remoteconnection.h"
+#include "remotepeer.h"
 
-RemoteConnection::RemoteConnection(QTcpSocket *socket, QObject *parent)
+using namespace Protocol;
+
+RemotePeer::RemotePeer(QTcpSocket *socket, QObject *parent)
     : SignalProxy::AbstractPeer(parent),
     _socket(socket),
     _signalProxy(0),
@@ -49,7 +51,7 @@ RemoteConnection::RemoteConnection(QTcpSocket *socket, QObject *parent)
 }
 
 
-QString RemoteConnection::description() const
+QString RemotePeer::description() const
 {
     if (socket())
         return socket()->peerAddress().toString();
@@ -58,13 +60,13 @@ QString RemoteConnection::description() const
 }
 
 
-SignalProxy *RemoteConnection::signalProxy() const
+::SignalProxy *RemotePeer::signalProxy() const
 {
     return _signalProxy;
 }
 
 
-void RemoteConnection::setSignalProxy(SignalProxy *proxy)
+void RemotePeer::setSignalProxy(::SignalProxy *proxy)
 {
     if (proxy == _signalProxy)
         return;
@@ -89,7 +91,7 @@ void RemoteConnection::setSignalProxy(SignalProxy *proxy)
 }
 
 
-void RemoteConnection::changeHeartBeatInterval(int secs)
+void RemotePeer::changeHeartBeatInterval(int secs)
 {
     if(secs <= 0)
         _heartBeatTimer->stop();
@@ -100,19 +102,19 @@ void RemoteConnection::changeHeartBeatInterval(int secs)
 }
 
 
-int RemoteConnection::lag() const
+int RemotePeer::lag() const
 {
     return _lag;
 }
 
 
-QTcpSocket *RemoteConnection::socket() const
+QTcpSocket *RemotePeer::socket() const
 {
     return _socket;
 }
 
 
-bool RemoteConnection::isSecure() const
+bool RemotePeer::isSecure() const
 {
     if (socket()) {
         if (isLocal())
@@ -127,7 +129,7 @@ bool RemoteConnection::isSecure() const
 }
 
 
-bool RemoteConnection::isLocal() const
+bool RemotePeer::isLocal() const
 {
     if (socket()) {
         if (socket()->peerAddress() == QHostAddress::LocalHost || socket()->peerAddress() == QHostAddress::LocalHostIPv6)
@@ -137,13 +139,13 @@ bool RemoteConnection::isLocal() const
 }
 
 
-bool RemoteConnection::isOpen() const
+bool RemotePeer::isOpen() const
 {
     return socket() && socket()->state() == QTcpSocket::ConnectedState;
 }
 
 
-void RemoteConnection::close(const QString &reason)
+void RemotePeer::close(const QString &reason)
 {
     if (!reason.isEmpty()) {
         qWarning() << "Disconnecting:" << reason;
@@ -155,20 +157,24 @@ void RemoteConnection::close(const QString &reason)
 }
 
 
-void RemoteConnection::handle(const HeartBeat &heartBeat)
+void RemotePeer::handle(const HeartBeat &heartBeat)
 {
     dispatch(HeartBeatReply(heartBeat.timestamp()));
 }
 
 
-void RemoteConnection::handle(const HeartBeatReply &heartBeatReply)
+void RemotePeer::handle(const HeartBeatReply &heartBeatReply)
 {
     _heartBeatCount = 0;
-    emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTimeUtc()));
+#if QT_VERSION < 0x040700
+    emit lagUpdated(heartBeatReply.timestamp().time().msecsTo(QTime::currentTime()) / 2);
+#else
+    emit lagUpdated(heartBeatReply.timestamp().msecsTo(QDateTime::currentDateTime()) / 2);
+#endif
 }
 
 
-void RemoteConnection::sendHeartBeat()
+void RemotePeer::sendHeartBeat()
 {
     if (signalProxy()->maxHeartBeatCount() > 0 && _heartBeatCount >= signalProxy()->maxHeartBeatCount()) {
         qWarning() << "Disconnecting peer:" << description()
@@ -183,7 +189,7 @@ void RemoteConnection::sendHeartBeat()
         emit lagUpdated(_lag);
     }
 
-    dispatch(HeartBeat(QDateTime::currentDateTimeUtc()));
+    dispatch(HeartBeat(QDateTime::currentDateTime()));
     ++_heartBeatCount;
 }
 
similarity index 72%
rename from src/common/remoteconnection.h
rename to src/common/remotepeer.h
index 198627a..e41a6a3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef REMOTECONNECTION_H
-#define REMOTECONNECTION_H
+#ifndef REMOTEPEER_H
+#define REMOTEPEER_H
 
 #include <QDateTime>
 #include <QTcpSocket>
 
+#include "protocol.h"
 #include "signalproxy.h"
 
 class QTimer;
 
-class RemoteConnection : public SignalProxy::AbstractPeer
+class RemotePeer : public SignalProxy::AbstractPeer
 {
     Q_OBJECT
 
 public:
-    RemoteConnection(QTcpSocket *socket, QObject *parent = 0);
-    virtual ~RemoteConnection() {};
+    RemotePeer(QTcpSocket *socket, QObject *parent = 0);
+    virtual ~RemotePeer() {};
 
     void setSignalProxy(SignalProxy *proxy);
 
@@ -67,19 +68,16 @@ signals:
     void transferProgress(int current, int max);
 
 protected:
-    class HeartBeat;
-    class HeartBeatReply;
-
     SignalProxy *signalProxy() const;
 
     template<class T>
     void handle(const T &protoMessage);
 
-    void handle(const HeartBeat &heartBeat);
-    void handle(const HeartBeatReply &heartBeatReply);
-
-    virtual void dispatch(const HeartBeat &msg) = 0;
-    virtual void dispatch(const HeartBeatReply &msg) = 0;
+    // These protocol messages get handled internally and won't reach SignalProxy
+    void handle(const Protocol::HeartBeat &heartBeat);
+    void handle(const Protocol::HeartBeatReply &heartBeatReply);
+    virtual void dispatch(const Protocol::HeartBeat &msg) = 0;
+    virtual void dispatch(const Protocol::HeartBeatReply &msg) = 0;
 
 private slots:
     void sendHeartBeat();
@@ -93,36 +91,9 @@ private:
     int _lag;
 };
 
-
-// These protocol messages get handled internally and won't reach SignalProxy
-
-class RemoteConnection::HeartBeat
-{
-public:
-    inline HeartBeat(const QDateTime &timestamp) : _timestamp(timestamp) {}
-
-    inline QDateTime timestamp() const { return _timestamp; }
-
-private:
-    QDateTime _timestamp;
-};
-
-
-class RemoteConnection::HeartBeatReply
-{
-public:
-    inline HeartBeatReply(const QDateTime &timestamp) : _timestamp(timestamp) {}
-
-    inline QDateTime timestamp() const { return _timestamp; }
-
-private:
-    QDateTime _timestamp;
-};
-
-
 // Template methods we need in the header
 template<class T> inline
-void RemoteConnection::handle(const T &protoMessage)
+void RemotePeer::handle(const T &protoMessage)
 {
     if (!signalProxy()) {
         qWarning() << Q_FUNC_INFO << "Cannot handle messages without a SignalProxy!";
index 7656a58..334d197 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b98a2c1..8df2d52 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fca6d0d..f05a509 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include <QEvent>
 #include <QCoreApplication>
 
+#include "protocol.h"
 #include "syncableobject.h"
 #include "util.h"
 
+using namespace Protocol;
+
 class RemovePeerEvent : public QEvent
 {
 public:
@@ -153,7 +156,7 @@ int SignalProxy::SignalRelay::qt_metacall(QMetaObject::Call _c, int _id, void **
                 params << QVariant(argTypes[i], _a[i+1]);
             }
 
-            proxy()->dispatch(SignalProxy::RpcCall(signal.signature, params));
+            proxy()->dispatch(RpcCall(signal.signature, params));
         }
         _id -= _slots.count();
     }
@@ -508,7 +511,7 @@ void SignalProxy::dispatch(const T &protoMessage)
 }
 
 
-void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::SyncMessage &syncMessage)
+void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SyncMessage &syncMessage)
 {
     if (!_syncSlave.contains(syncMessage.className()) || !_syncSlave[syncMessage.className()].contains(syncMessage.objectName())) {
         qWarning() << QString("no registered receiver for sync call: %1::%2 (objectName=\"%3\"). Params are:").arg(syncMessage.className(), syncMessage.slotName(), syncMessage.objectName())
@@ -550,7 +553,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Syn
 }
 
 
-void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::InitRequest &initRequest)
+void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const InitRequest &initRequest)
 {
    if (!_syncSlave.contains(initRequest.className())) {
         qWarning() << "SignalProxy::handleInitRequest() received initRequest for unregistered Class:"
@@ -569,7 +572,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Ini
 }
 
 
-void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::InitData &initData)
+void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const InitData &initData)
 {
     Q_UNUSED(peer)
 
@@ -590,7 +593,7 @@ void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::Ini
 }
 
 
-void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const SignalProxy::RpcCall &rpcCall)
+void SignalProxy::handle(SignalProxy::AbstractPeer *peer, const RpcCall &rpcCall)
 {
     Q_UNUSED(peer)
 
index 645157e..d446fef 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include <QByteArray>
 #include <QTimer>
 
+#include "protocol.h"
+
 class SyncableObject;
 struct QMetaObject;
 
+
 class SignalProxy : public QObject
 {
     Q_OBJECT
@@ -45,11 +48,6 @@ class SignalProxy : public QObject
 public:
     class AbstractPeer;
 
-    class SyncMessage;
-    class RpcCall;
-    class InitRequest;
-    class InitData;
-
     enum ProxyMode {
         Server,
         Client
@@ -131,10 +129,10 @@ private:
     template<class T>
     void dispatch(const T &protoMessage);
 
-    void handle(AbstractPeer *peer, const SyncMessage &syncMessage);
-    void handle(AbstractPeer *peer, const RpcCall &rpcCall);
-    void handle(AbstractPeer *peer, const InitRequest &initRequest);
-    void handle(AbstractPeer *peer, const InitData &initData);
+    void handle(AbstractPeer *peer, const Protocol::SyncMessage &syncMessage);
+    void handle(AbstractPeer *peer, const Protocol::RpcCall &rpcCall);
+    void handle(AbstractPeer *peer, const Protocol::InitRequest &initRequest);
+    void handle(AbstractPeer *peer, const Protocol::InitData &initData);
 
     bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params, QVariant &returnValue);
     bool invokeSlot(QObject *receiver, int methodId, const QVariantList &params = QVariantList());
@@ -170,8 +168,8 @@ private:
 
     friend class SignalRelay;
     friend class SyncableObject;
-    friend class InternalConnection;
-    friend class RemoteConnection;
+    friend class InternalPeer;
+    friend class RemotePeer;
 };
 
 
@@ -182,7 +180,7 @@ class SignalProxy::ExtendedMetaObject
 {
     class MethodDescriptor
     {
-public:
+    public:
         MethodDescriptor(const QMetaMethod &method);
         MethodDescriptor() : _returnType(-1), _minArgCount(-1), _receiverMode(SignalProxy::Client) {}
 
@@ -192,7 +190,7 @@ public:
         inline int minArgCount() const { return _minArgCount; }
         inline SignalProxy::ProxyMode receiverMode() const { return _receiverMode; }
 
-private:
+    private:
         QByteArray _methodName;
         QList<int> _argTypes;
         int _returnType;
@@ -257,10 +255,10 @@ public:
     virtual int lag() const = 0;
 
 public slots:
-    virtual void dispatch(const SyncMessage &msg) = 0;
-    virtual void dispatch(const RpcCall &msg) = 0;
-    virtual void dispatch(const InitRequest &msg) = 0;
-    virtual void dispatch(const InitData &msg) = 0;
+    virtual void dispatch(const Protocol::SyncMessage &msg) = 0;
+    virtual void dispatch(const Protocol::RpcCall &msg) = 0;
+    virtual void dispatch(const Protocol::InitRequest &msg) = 0;
+    virtual void dispatch(const Protocol::InitData &msg) = 0;
 
     virtual void close(const QString &reason = QString()) = 0;
 
@@ -271,75 +269,4 @@ signals:
     void lagUpdated(int msecs);
 };
 
-
-// ==================================================
-//  Protocol Messages
-// ==================================================
-class SignalProxy::SyncMessage
-{
-public:
-    inline SyncMessage(const QByteArray &className, const QString &objectName, const QByteArray &slotName, const QVariantList &params)
-    : _className(className), _objectName(objectName), _slotName(slotName), _params(params) {}
-
-    inline QByteArray className() const { return _className; }
-    inline QString objectName() const { return _objectName; }
-    inline QByteArray slotName() const { return _slotName; }
-
-    inline QVariantList params() const { return _params; }
-
-private:
-    QByteArray _className;
-    QString _objectName;
-    QByteArray _slotName;
-    QVariantList _params;
-};
-
-
-class SignalProxy::RpcCall
-{
-public:
-    inline RpcCall(const QByteArray &slotName, const QVariantList &params)
-    : _slotName(slotName), _params(params) {}
-
-    inline QByteArray slotName() const { return _slotName; }
-    inline QVariantList params() const { return _params; }
-
-private:
-    QByteArray _slotName;
-    QVariantList _params;
-};
-
-
-class SignalProxy::InitRequest
-{
-public:
-    inline InitRequest(const QByteArray &className, const QString &objectName)
-    : _className(className), _objectName(objectName) {}
-
-    inline QByteArray className() const { return _className; }
-    inline QString objectName() const { return _objectName; }
-
-private:
-    QByteArray _className;
-    QString _objectName;
-};
-
-
-class SignalProxy::InitData
-{
-public:
-    inline InitData(const QByteArray &className, const QString &objectName, const QVariantMap &initData)
-    : _className(className), _objectName(objectName), _initData(initData) {}
-
-    inline QByteArray className() const { return _className; }
-    inline QString objectName() const { return _objectName; }
-
-    inline QVariantMap initData() const { return _initData; }
-
-private:
-    QByteArray _className;
-    QString _objectName;
-    QVariantMap _initData;
-};
-
 #endif
index a9417b1..2db7e46 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0042c50..895d657 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index aa0521b..0fbb2b7 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e7f531b..75f32f2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2b5e783..bb90355 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e721e4d..ad08947 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 104c056..0cf91b9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f5b554f..4413211 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 #include "core.h"
 #include "coresession.h"
 #include "coresettings.h"
-#include "internalconnection.h"
+#include "internalpeer.h"
 #include "postgresqlstorage.h"
 #include "quassel.h"
-#include "signalproxy.h"
 #include "sqlitestorage.h"
 #include "network.h"
 #include "logger.h"
 
 #include "util.h"
 
-#include "protocols/legacy/legacyconnection.h"
+#include "protocols/legacy/legacypeer.h"
 
 // migration related
 #include <QFile>
@@ -57,8 +56,8 @@ const int Core::AddClientEventId = QEvent::registerEventType();
 class AddClientEvent : public QEvent
 {
 public:
-    AddClientEvent(RemoteConnection *connection, UserId uid) : QEvent(QEvent::Type(Core::AddClientEventId)), connection(connection), userId(uid) {}
-    RemoteConnection *connection;
+    AddClientEvent(RemotePeer *p, UserId uid) : QEvent(QEvent::Type(Core::AddClientEventId)), peer(p), userId(uid) {}
+    RemotePeer *peer;
     UserId userId;
 };
 
@@ -218,8 +217,8 @@ void Core::init()
 
 Core::~Core()
 {
-    foreach(RemoteConnection *connection, clientInfo.keys()) {
-        connection->close(); // disconnect non authed clients
+    foreach(RemotePeer *peer, clientInfo.keys()) {
+        peer->close(); // disconnect non authed clients
     }
     qDeleteAll(sessions);
     qDeleteAll(_storageBackends);
@@ -518,13 +517,13 @@ void Core::incomingConnection()
     Q_ASSERT(server);
     while (server->hasPendingConnections()) {
         QTcpSocket *socket = server->nextPendingConnection();
-        RemoteConnection *connection = new LegacyConnection(socket, this);
+        RemotePeer *peer = new LegacyPeer(socket, this);
 
-        connect(connection, SIGNAL(disconnected()), SLOT(clientDisconnected()));
-        connect(connection, SIGNAL(dataReceived(QVariant)), SLOT(processClientMessage(QVariant)));
-        connect(connection, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError)));
+        connect(peer, SIGNAL(disconnected()), SLOT(clientDisconnected()));
+        connect(peer, SIGNAL(dataReceived(QVariant)), SLOT(processClientMessage(QVariant)));
+        connect(peer, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(socketError(QAbstractSocket::SocketError)));
 
-        clientInfo.insert(connection, QVariantMap());
+        clientInfo.insert(peer, QVariantMap());
         quInfo() << qPrintable(tr("Client connected from"))  << qPrintable(socket->peerAddress().toString());
 
         if (!_configured) {
@@ -536,8 +535,8 @@ void Core::incomingConnection()
 
 void Core::processClientMessage(const QVariant &data)
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(sender());
-    if (!connection) {
+    RemotePeer *peer = qobject_cast<RemotePeer *>(sender());
+    if (!peer) {
         qWarning() << Q_FUNC_INFO << "Message not sent by RemoteConnection!";
         return;
     }
@@ -546,7 +545,7 @@ void Core::processClientMessage(const QVariant &data)
     if (!msg.contains("MsgType")) {
         // Client is way too old, does not even use the current init format
         qWarning() << qPrintable(tr("Antique client trying to connect... refusing."));
-        connection->close();
+        peer->close();
         return;
     }
 
@@ -561,9 +560,9 @@ void Core::processClientMessage(const QVariant &data)
             reply["Error"] = tr("<b>Your Quassel Client is too old!</b><br>"
                                 "This core needs at least client/core protocol version %1.<br>"
                                 "Please consider upgrading your client.").arg(Quassel::buildInfo().coreNeedsProtocol);
-            connection->writeSocketData(reply);
-            qWarning() << qPrintable(tr("Client")) << connection->description() << qPrintable(tr("too old, rejecting."));
-            connection->close();
+            peer->writeSocketData(reply);
+            qWarning() << qPrintable(tr("Client")) << peer->description() << qPrintable(tr("too old, rejecting."));
+            peer->close();
             return;
         }
 
@@ -590,7 +589,7 @@ void Core::processClientMessage(const QVariant &data)
 
 #ifdef HAVE_SSL
         SslServer *sslServer = qobject_cast<SslServer *>(&_server);
-        QSslSocket *sslSocket = qobject_cast<QSslSocket *>(connection->socket());
+        QSslSocket *sslSocket = qobject_cast<QSslSocket *>(peer->socket());
         bool supportSsl = sslServer && sslSocket && sslServer->isCertValid();
 #else
         bool supportSsl = false;
@@ -626,15 +625,15 @@ void Core::processClientMessage(const QVariant &data)
         else {
             reply["Configured"] = true;
         }
-        clientInfo[connection] = msg; // store for future reference
+        clientInfo[peer] = msg; // store for future reference
         reply["MsgType"] = "ClientInitAck";
-        connection->writeSocketData(reply);
-        connection->socket()->flush(); // ensure that the write cache is flushed before we switch to ssl
+        peer->writeSocketData(reply);
+        peer->socket()->flush(); // ensure that the write cache is flushed before we switch to ssl
 
 #ifdef HAVE_SSL
         // after we told the client that we are ssl capable we switch to ssl mode
         if (supportSsl && msg["UseSsl"].toBool()) {
-            qDebug() << qPrintable(tr("Starting TLS for Client:"))  << connection->description();
+            qDebug() << qPrintable(tr("Starting TLS for Client:"))  << peer->description();
             connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError> &)), SLOT(sslErrors(const QList<QSslError> &)));
             sslSocket->startServerEncryption();
         }
@@ -642,20 +641,20 @@ void Core::processClientMessage(const QVariant &data)
 
 #ifndef QT_NO_COMPRESS
         if (supportsCompression && msg["UseCompression"].toBool()) {
-            connection->socket()->setProperty("UseCompression", true);
-            qDebug() << "Using compression for Client:" << qPrintable(connection->socket()->peerAddress().toString());
+            peer->socket()->setProperty("UseCompression", true);
+            qDebug() << "Using compression for Client:" << qPrintable(peer->socket()->peerAddress().toString());
         }
 #endif
     }
     else {
         // for the rest, we need an initialized connection
-        if (!clientInfo.contains(connection)) {
+        if (!clientInfo.contains(peer)) {
             QVariantMap reply;
             reply["MsgType"] = "ClientLoginReject";
             reply["Error"] = tr("<b>Client not initialized!</b><br>You need to send an init message before trying to login.");
-            connection->writeSocketData(reply);
-            qWarning() << qPrintable(tr("Client")) << qPrintable(connection->socket()->peerAddress().toString()) << qPrintable(tr("did not send an init message before trying to login, rejecting."));
-            connection->close(); return;
+            peer->writeSocketData(reply);
+            qWarning() << qPrintable(tr("Client")) << qPrintable(peer->socket()->peerAddress().toString()) << qPrintable(tr("did not send an init message before trying to login, rejecting."));
+            peer->close(); return;
         }
         if (msg["MsgType"] == "CoreSetupData") {
             QVariantMap reply;
@@ -667,7 +666,7 @@ void Core::processClientMessage(const QVariant &data)
             else {
                 reply["MsgType"] = "CoreSetupAck";
             }
-            connection->writeSocketData(reply);
+            peer->writeSocketData(reply);
         }
         else if (msg["MsgType"] == "ClientLogin") {
             QVariantMap reply;
@@ -675,13 +674,13 @@ void Core::processClientMessage(const QVariant &data)
             if (uid == 0) {
                 reply["MsgType"] = "ClientLoginReject";
                 reply["Error"] = tr("<b>Invalid username or password!</b><br>The username/password combination you supplied could not be found in the database.");
-                connection->writeSocketData(reply);
+                peer->writeSocketData(reply);
                 return;
             }
             reply["MsgType"] = "ClientLoginAck";
-            connection->writeSocketData(reply);
-            quInfo() << qPrintable(tr("Client")) << qPrintable(connection->socket()->peerAddress().toString()) << qPrintable(tr("initialized and authenticated successfully as \"%1\" (UserId: %2).").arg(msg["User"].toString()).arg(uid.toInt()));
-            setupClientSession(connection, uid);
+            peer->writeSocketData(reply);
+            quInfo() << qPrintable(tr("Client")) << qPrintable(peer->socket()->peerAddress().toString()) << qPrintable(tr("initialized and authenticated successfully as \"%1\" (UserId: %2).").arg(msg["User"].toString()).arg(uid.toInt()));
+            setupClientSession(peer, uid);
         }
     }
 }
@@ -690,12 +689,12 @@ void Core::processClientMessage(const QVariant &data)
 // Potentially called during the initialization phase (before handing the connection off to the session)
 void Core::clientDisconnected()
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(sender());
-    Q_ASSERT(connection);
+    RemotePeer *peer = qobject_cast<RemotePeer *>(sender());
+    Q_ASSERT(peer);
 
-    quInfo() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(connection->socket()->peerAddress().toString());
-    clientInfo.remove(connection);
-    connection->deleteLater();
+    quInfo() << qPrintable(tr("Non-authed client disconnected.")) << qPrintable(peer->socket()->peerAddress().toString());
+    clientInfo.remove(peer);
+    peer->deleteLater();
 
     // make server listen again if still not configured
     if (!_configured) {
@@ -707,12 +706,12 @@ void Core::clientDisconnected()
 }
 
 
-void Core::setupClientSession(RemoteConnection *connection, UserId uid)
+void Core::setupClientSession(RemotePeer *peer, UserId uid)
 {
     // From now on everything is handled by the client session
-    disconnect(connection, 0, this, 0);
-    connection->socket()->flush();
-    clientInfo.remove(connection);
+    disconnect(peer, 0, this, 0);
+    peer->socket()->flush();
+    clientInfo.remove(peer);
 
     // Find or create session for validated user
     SessionThread *session;
@@ -722,15 +721,15 @@ void Core::setupClientSession(RemoteConnection *connection, UserId uid)
     else {
         session = createSession(uid);
         if (!session) {
-            qWarning() << qPrintable(tr("Could not initialize session for client:")) << qPrintable(connection->socket()->peerAddress().toString());
-            connection->close();
+            qWarning() << qPrintable(tr("Could not initialize session for client:")) << qPrintable(peer->socket()->peerAddress().toString());
+            peer->close();
             return;
         }
     }
 
     // as we are currently handling an event triggered by incoming data on this socket
     // it is unsafe to directly move the socket to the client thread.
-    QCoreApplication::postEvent(this, new AddClientEvent(connection, uid));
+    QCoreApplication::postEvent(this, new AddClientEvent(peer, uid));
 }
 
 
@@ -738,27 +737,27 @@ void Core::customEvent(QEvent *event)
 {
     if (event->type() == AddClientEventId) {
         AddClientEvent *addClientEvent = static_cast<AddClientEvent *>(event);
-        addClientHelper(addClientEvent->connection, addClientEvent->userId);
+        addClientHelper(addClientEvent->peer, addClientEvent->userId);
         return;
     }
 }
 
 
-void Core::addClientHelper(RemoteConnection *connection, UserId uid)
+void Core::addClientHelper(RemotePeer *peer, UserId uid)
 {
     // Find or create session for validated user
     if (!sessions.contains(uid)) {
-        qWarning() << qPrintable(tr("Could not find a session for client:")) << qPrintable(connection->socket()->peerAddress().toString());
-        connection->close();
+        qWarning() << qPrintable(tr("Could not find a session for client:")) << qPrintable(peer->socket()->peerAddress().toString());
+        peer->close();
         return;
     }
 
     SessionThread *session = sessions[uid];
-    session->addClient(connection);
+    session->addClient(peer);
 }
 
 
-void Core::setupInternalClientSession(InternalConnection *clientConnection)
+void Core::setupInternalClientSession(InternalPeer *clientPeer)
 {
     if (!_configured) {
         stopListening();
@@ -774,9 +773,9 @@ void Core::setupInternalClientSession(InternalConnection *clientConnection)
         return;
     }
 
-    InternalConnection *coreConnection = new InternalConnection(this);
-    coreConnection->setPeer(clientConnection);
-    clientConnection->setPeer(coreConnection);
+    InternalPeer *corePeer = new InternalPeer(this);
+    corePeer->setPeer(clientPeer);
+    clientPeer->setPeer(corePeer);
 
     // Find or create session for validated user
     SessionThread *sessionThread;
@@ -785,7 +784,7 @@ void Core::setupInternalClientSession(InternalConnection *clientConnection)
     else
         sessionThread = createSession(uid);
 
-    sessionThread->addClient(coreConnection);
+    sessionThread->addClient(corePeer);
 }
 
 
@@ -816,9 +815,9 @@ void Core::sslErrors(const QList<QSslError> &errors)
 
 void Core::socketError(QAbstractSocket::SocketError err)
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(sender());
-    if (connection && err != QAbstractSocket::RemoteHostClosedError)
-        qWarning() << "Core::socketError()" << connection->socket() << err << connection->socket()->errorString();
+    RemotePeer *peer = qobject_cast<RemotePeer *>(sender());
+    if (peer && err != QAbstractSocket::RemoteHostClosedError)
+        qWarning() << "Core::socketError()" << peer->socket() << err << peer->socket()->errorString();
 }
 
 
index 48c015d..ebe8061 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -42,7 +42,7 @@
 #include "types.h"
 
 class CoreSession;
-class RemoteConnection;
+class RemotePeer;
 struct NetworkInfo;
 class SessionThread;
 class SignalProxy;
@@ -485,7 +485,7 @@ public slots:
     /** \note This method is threadsafe.
      */
     void syncStorage();
-    void setupInternalClientSession(InternalConnection *clientConnection);
+    void setupInternalClientSession(InternalPeer *clientConnection);
 
 signals:
     //! Sent when a BufferInfo is updated in storage.
@@ -520,8 +520,8 @@ private:
     static Core *instanceptr;
 
     SessionThread *createSession(UserId userId, bool restoreState = false);
-    void setupClientSession(RemoteConnection *connection, UserId uid);
-    void addClientHelper(RemoteConnection *connection, UserId uid);
+    void setupClientSession(RemotePeer *peer, UserId uid);
+    void addClientHelper(RemotePeer *peer, UserId uid);
     //void processCoreSetup(QTcpSocket *socket, QVariantMap &msg);
     QString setupCoreForInternalUsage();
     QString setupCore(QVariantMap setupData);
@@ -548,7 +548,7 @@ private:
 
     OidentdConfigGenerator *_oidentdConfigGenerator;
 
-    QHash<RemoteConnection *, QVariantMap> clientInfo;
+    QHash<RemotePeer *, QVariantMap> clientInfo;
 
     QHash<QString, Storage *> _storageBackends;
 
index f7f5cf6..d811ea1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 25b9ddf..814bf92 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3dabe76..3e3f9d1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e2f8ccf..2bd5386 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d380db8..371ae60 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6b76b09..d1f225c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f12b642..c08b1c7 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 95f3c70..53f0de4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index af5794a..847148b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bea39cf..46b06dc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 46b1305..efb7356 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ae974d9..8248e28 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5832807..b0cbe4c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f232156..0e1b4df 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a7fb4ad..549e503 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 719a351..05ba7bb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index de4878e..b64e7bf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bdd4f18..8e6fc59 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 80db0d0..39ee2a4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 42cfee5..c1de5e2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7904e16..40abe95 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 98995bf..99d1881 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 84932d5..c774604 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index dfbba29..bb7d1de 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4e65918..301d3e9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5bb0bcf..79f5d38 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 751e86f..cc5a9f8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 512ac10..101f527 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7b6048a..3b31f0d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a18f231..c654d52 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f955882..e045697 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -45,6 +45,7 @@ public slots:
     virtual inline void requestSetAutoWhoInterval(int interval) { setAutoWhoInterval(interval); }
     virtual inline void requestSetAutoWhoNickLimit(int nickLimit) { setAutoWhoNickLimit(nickLimit); }
     virtual inline void requestSetAutoWhoDelay(int delay) { setAutoWhoDelay(delay); }
+    virtual inline void requestSetStandardCtcp(bool enabled) { setStandardCtcp(enabled); }
 };
 
 
index 0ac23b7..d44cf2b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -37,7 +37,7 @@
 #include "coreusersettings.h"
 #include "ctcpparser.h"
 #include "eventstringifier.h"
-#include "internalconnection.h"
+#include "internalpeer.h"
 #include "ircchannel.h"
 #include "ircparser.h"
 #include "ircuser.h"
@@ -46,7 +46,7 @@
 #include "storage.h"
 #include "util.h"
 
-#include "protocols/legacy/legacyconnection.h"
+#include "protocols/legacy/legacypeer.h"
 
 class ProcessMessagesEvent : public QEvent
 {
@@ -206,28 +206,28 @@ void CoreSession::restoreSessionState()
 }
 
 
-void CoreSession::addClient(RemoteConnection *connection)
+void CoreSession::addClient(RemotePeer *peer)
 {
     QVariantMap reply;
     reply["MsgType"] = "SessionInit";
     reply["SessionState"] = sessionState();
-    connection->writeSocketData(reply);
-    signalProxy()->addPeer(connection);
+    peer->writeSocketData(reply);
+    signalProxy()->addPeer(peer);
 }
 
 
-void CoreSession::addClient(InternalConnection *connection)
+void CoreSession::addClient(InternalPeer *peer)
 {
-    signalProxy()->addPeer(connection);
+    signalProxy()->addPeer(peer);
     emit sessionState(sessionState());
 }
 
 
 void CoreSession::removeClient(SignalProxy::AbstractPeer *peer)
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(peer);
-    if (connection)
-        quInfo() << qPrintable(tr("Client")) << connection->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt()));
+    RemotePeer *p = qobject_cast<RemotePeer *>(peer);
+    if (p)
+        quInfo() << qPrintable(tr("Client")) << p->description() << qPrintable(tr("disconnected (UserId: %1).").arg(user().toInt()));
 }
 
 
index fffb768..fdb952f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -42,11 +42,11 @@ class CoreSessionEventProcessor;
 class CtcpParser;
 class EventManager;
 class EventStringifier;
-class InternalConnection;
+class InternalPeer;
 class IrcParser;
 class MessageEvent;
 class NetworkConnection;
-class RemoteConnection;
+class RemotePeer;
 
 struct NetworkInfo;
 
@@ -89,8 +89,8 @@ public:
     void restoreSessionState();
 
 public slots:
-    void addClient(RemoteConnection *connection);
-    void addClient(InternalConnection *connection);
+    void addClient(RemotePeer *peer);
+    void addClient(InternalPeer *peer);
 
     void msgFromClient(BufferInfo, QString message);
 
index 1e9bf05..692257a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -116,14 +116,22 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent *e)
 
     CoreNetwork *net = coreNetwork(e);
 
-    QString construct = net->saslAccount();
-    construct.append(QChar(QChar::Null));
-    construct.append(net->saslAccount());
-    construct.append(QChar(QChar::Null));
-    construct.append(net->saslPassword());
-    QByteArray saslData = QByteArray(construct.toAscii().toBase64());
-    saslData.prepend("AUTHENTICATE ");
-    net->putRawLine(saslData);
+#ifdef HAVE_SSL
+    if (net->identityPtr()->sslCert().isNull()) {
+#endif
+        QString construct = net->saslAccount();
+        construct.append(QChar(QChar::Null));
+        construct.append(net->saslAccount());
+        construct.append(QChar(QChar::Null));
+        construct.append(net->saslPassword());
+        QByteArray saslData = QByteArray(construct.toAscii().toBase64());
+        saslData.prepend("AUTHENTICATE ");
+        net->putRawLine(saslData);
+#ifdef HAVE_SSL
+    } else {
+        net->putRawLine("AUTHENTICATE +");
+    }
+#endif
 }
 
 
@@ -133,9 +141,19 @@ void CoreSessionEventProcessor::processIrcEventCap(IrcEvent *e)
     // additional CAP messages (ls, multi-prefix, et cetera).
 
     if (e->params().count() == 3) {
-        if (e->params().at(2) == "sasl") {
+        if (e->params().at(2).startsWith("sasl")) { // Freenode (at least) sends "sasl " with a trailing space for some reason!
             // FIXME use event
-            coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN")); // Only working with PLAIN atm, blowfish later
+            // if the current identity has a cert set, use SASL EXTERNAL
+#ifdef HAVE_SSL
+            if (!coreNetwork(e)->identityPtr()->sslCert().isNull()) {
+                coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE EXTERNAL"));
+            } else {
+#endif
+                // Only working with PLAIN atm, blowfish later
+                coreNetwork(e)->putRawLine(coreNetwork(e)->serverEncode("AUTHENTICATE PLAIN"));
+#ifdef HAVE_SSL
+            }
+#endif
         }
     }
 }
index 07bb7d8..6a163c6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a740942..8d0e4b9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d8f533e..22a8870 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bb677c3..53f4c2e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 288e2e8..ccd9bd2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 64ac7ea..d9c2608 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index db75535..bcc9d54 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1f1660f..7517db6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -20,6 +20,7 @@
 
 #include "ctcpparser.h"
 
+#include "corenetworkconfig.h"
 #include "coresession.h"
 #include "ctcpevent.h"
 #include "messageevent.h"
@@ -36,14 +37,24 @@ CtcpParser::CtcpParser(CoreSession *coreSession, QObject *parent)
     _ctcpMDequoteHash[MQUOTE + 'r'] = QByteArray(1, '\r');
     _ctcpMDequoteHash[MQUOTE + MQUOTE] = MQUOTE;
 
-    QByteArray XQUOTE = QByteArray("\134");
-    _ctcpXDelimDequoteHash[XQUOTE + XQUOTE] = XQUOTE;
-    _ctcpXDelimDequoteHash[XQUOTE + QByteArray("a")] = XDELIM;
+    setStandardCtcp(_coreSession->networkConfig()->standardCtcp());
 
+    connect(_coreSession->networkConfig(), SIGNAL(standardCtcpSet(bool)), this, SLOT(setStandardCtcp(bool)));
     connect(this, SIGNAL(newEvent(Event *)), _coreSession->eventManager(), SLOT(postEvent(Event *)));
 }
 
 
+void CtcpParser::setStandardCtcp(bool enabled)
+{
+    QByteArray XQUOTE = QByteArray("\134");
+    if (enabled)
+        _ctcpXDelimDequoteHash[XQUOTE + XQUOTE] = XQUOTE;
+    else
+        _ctcpXDelimDequoteHash.remove(XQUOTE + XQUOTE);
+    _ctcpXDelimDequoteHash[XQUOTE + QByteArray("a")] = XDELIM;
+}
+
+
 void CtcpParser::displayMsg(NetworkEvent *event, Message::Type msgType, const QString &msg, const QString &sender,
     const QString &target, Message::Flags msgFlags)
 {
@@ -148,8 +159,6 @@ void CtcpParser::processIrcEventRawPrivmsg(IrcEventRawMessage *event)
 
 void CtcpParser::parse(IrcEventRawMessage *e, Message::Type messagetype)
 {
-    QByteArray ctcp;
-
     //lowlevel message dequote
     QByteArray dequotedMessage = lowLevelDequote(e->rawMessage());
 
@@ -161,6 +170,53 @@ void CtcpParser::parse(IrcEventRawMessage *e, Message::Type messagetype)
                            ? Message::Redirected
                            : Message::None;
 
+    if (coreSession()->networkConfig()->standardCtcp())
+        parseStandard(e, messagetype, dequotedMessage, ctcptype, flags);
+    else
+        parseSimple(e, messagetype, dequotedMessage, ctcptype, flags);
+}
+
+
+// only accept CTCPs in their simplest form, i.e. one ctcp, from start to
+// end, no text around it; not as per the 'specs', but makes people happier
+void CtcpParser::parseSimple(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags)
+{
+    if (dequotedMessage.count(XDELIM) != 2 || dequotedMessage[0] != '\001' || dequotedMessage[dequotedMessage.count() -1] != '\001') {
+        displayMsg(e, messagetype, targetDecode(e, dequotedMessage), e->prefix(), e->target(), flags);
+    } else {
+        int spacePos = -1;
+        QString ctcpcmd, ctcpparam;
+
+        QByteArray ctcp = xdelimDequote(dequotedMessage.mid(1, dequotedMessage.count() - 2));
+        spacePos = ctcp.indexOf(' ');
+        if (spacePos != -1) {
+            ctcpcmd = targetDecode(e, ctcp.left(spacePos));
+            ctcpparam = targetDecode(e, ctcp.mid(spacePos + 1));
+        } else {
+            ctcpcmd = targetDecode(e, ctcp);
+            ctcpparam = QString();
+        }
+        ctcpcmd = ctcpcmd.toUpper();
+
+        // we don't want to block /me messages by the CTCP ignore list
+        if (ctcpcmd == QLatin1String("ACTION") || !coreSession()->ignoreListManager()->ctcpMatch(e->prefix(), e->network()->networkName(), ctcpcmd)) {
+            QUuid uuid = QUuid::createUuid();
+            _replies.insert(uuid, CtcpReply(coreNetwork(e), nickFromMask(e->prefix())));
+            CtcpEvent *event = new CtcpEvent(EventManager::CtcpEvent, e->network(), e->prefix(), e->target(),
+                ctcptype, ctcpcmd, ctcpparam, e->timestamp(), uuid);
+            emit newEvent(event);
+            CtcpEvent *flushEvent = new CtcpEvent(EventManager::CtcpEventFlush, e->network(), e->prefix(), e->target(),
+                ctcptype, "INVALID", QString(), e->timestamp(), uuid);
+            emit newEvent(flushEvent);
+        }
+    }
+}
+
+
+void CtcpParser::parseStandard(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags)
+{
+    QByteArray ctcp;
+
     QList<CtcpEvent *> ctcpEvents;
     QUuid uuid; // needed to group all replies together
 
index a33751f..5847785 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -26,6 +26,7 @@
 #include "corenetwork.h"
 #include "eventmanager.h"
 #include "ircevent.h"
+#include "ctcpevent.h"
 
 class CoreSession;
 class CtcpEvent;
@@ -63,6 +64,8 @@ protected:
         Message::Flags msgFlags = Message::None);
 
     void parse(IrcEventRawMessage *event, Message::Type msgType);
+    void parseSimple(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags);
+    void parseStandard(IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags);
 
     QByteArray lowLevelQuote(const QByteArray &);
     QByteArray lowLevelDequote(const QByteArray &);
@@ -72,6 +75,9 @@ protected:
     QByteArray pack(const QByteArray &ctcpTag, const QByteArray &message);
     void packedReply(CoreNetwork *network, const QString &bufname, const QList<QByteArray> &replies);
 
+private slots:
+    void setStandardCtcp(bool enabled);
+
 private:
     inline QString targetDecode(IrcEventRawMessage *e, const QByteArray &msg) { return coreNetwork(e)->userDecode(e->target(), msg); }
 
index 0c1a80f..26a2bbe 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -615,7 +615,7 @@ void EventStringifier::processIrcEvent333(IrcEvent *e)
     QDateTime topicSetTime = QDateTime::fromTime_t(e->params()[2].toInt());
     displayMsg(e, Message::Topic, tr("Topic set by %1 on %2")
         .arg(e->params()[1],
-            QLocale().toString(topicSetTime, QLocale().dateTimeFormat()), QString(), channel));
+            QLocale().toString(topicSetTime, QLocale().dateTimeFormat())), QString(), channel);
 }
 
 
index e2f61c0..f3cfd46 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 44e6cd1..f3db4fc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 67016c2..04b7d06 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index cd38cc7..ce2eef8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index da63678..1838c0f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3d9a055..6a77665 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4d097cb..0612ae0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c13a5aa..3965704 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -279,21 +279,26 @@ void PostgreSqlStorage::setUserSetting(UserId userId, const QString &settingName
     out << data;
 
     QSqlDatabase db = logDb();
-    QSqlQuery query(db);
-    query.prepare(queryString("insert_user_setting"));
-    query.bindValue(":userid", userId.toInt());
-    query.bindValue(":settingname", settingName);
-    query.bindValue(":settingvalue", rawData);
-    safeExec(query);
+    QSqlQuery selectQuery(db);
+    selectQuery.prepare(queryString("select_user_setting"));
+    selectQuery.bindValue(":userid", userId.toInt());
+    selectQuery.bindValue(":settingname", settingName);
+    safeExec(selectQuery);
 
-    if (query.lastError().isValid()) {
-        QSqlQuery updateQuery(db);
-        updateQuery.prepare(queryString("update_user_setting"));
-        updateQuery.bindValue(":userid", userId.toInt());
-        updateQuery.bindValue(":settingname", settingName);
-        updateQuery.bindValue(":settingvalue", rawData);
-        safeExec(updateQuery);
+    QString setQueryString;
+    if (!selectQuery.first()) {
+        setQueryString = queryString("insert_user_setting");
+    }
+    else {
+        setQueryString = queryString("update_user_setting");
     }
+
+    QSqlQuery setQuery(db);
+    setQuery.prepare(setQueryString);
+    setQuery.bindValue(":userid", userId.toInt());
+    setQuery.bindValue(":settingname", settingName);
+    setQuery.bindValue(":settingvalue", rawData);
+    safeExec(setQuery);
 }
 
 
index 79ec9c5..5be3f80 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 49790df..e886db5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -20,8 +20,8 @@
 
 #include "core.h"
 #include "coresession.h"
-#include "internalconnection.h"
-#include "remoteconnection.h"
+#include "internalpeer.h"
+#include "remotepeer.h"
 #include "sessionthread.h"
 #include "signalproxy.h"
 
@@ -86,13 +86,13 @@ void SessionThread::addClient(QObject *peer)
 
 void SessionThread::addClientToSession(QObject *peer)
 {
-    RemoteConnection *connection = qobject_cast<RemoteConnection *>(peer);
-    if (connection) {
-        addRemoteClientToSession(connection);
+    RemotePeer *remote = qobject_cast<RemotePeer *>(peer);
+    if (remote) {
+        addRemoteClientToSession(remote);
         return;
     }
 
-    InternalConnection *internal = qobject_cast<InternalConnection *>(peer);
+    InternalPeer *internal = qobject_cast<InternalPeer *>(peer);
     if (internal) {
         addInternalClientToSession(internal);
         return;
@@ -102,27 +102,27 @@ void SessionThread::addClientToSession(QObject *peer)
 }
 
 
-void SessionThread::addRemoteClientToSession(RemoteConnection *connection)
+void SessionThread::addRemoteClientToSession(RemotePeer *remotePeer)
 {
-    connection->setParent(0);
-    connection->moveToThread(session()->thread());
-    emit addRemoteClient(connection);
+    remotePeer->setParent(0);
+    remotePeer->moveToThread(session()->thread());
+    emit addRemoteClient(remotePeer);
 }
 
 
-void SessionThread::addInternalClientToSession(InternalConnection *connection)
+void SessionThread::addInternalClientToSession(InternalPeer *internalPeer)
 {
-    connection->setParent(0);
-    connection->moveToThread(session()->thread());
-    emit addInternalClient(connection);
+    internalPeer->setParent(0);
+    internalPeer->moveToThread(session()->thread());
+    emit addInternalClient(internalPeer);
 }
 
 
 void SessionThread::run()
 {
     _session = new CoreSession(user(), _restoreState);
-    connect(this, SIGNAL(addRemoteClient(RemoteConnection*)), _session, SLOT(addClient(RemoteConnection*)));
-    connect(this, SIGNAL(addInternalClient(InternalConnection*)), _session, SLOT(addClient(InternalConnection*)));
+    connect(this, SIGNAL(addRemoteClient(RemotePeer*)), _session, SLOT(addClient(RemotePeer*)));
+    connect(this, SIGNAL(addInternalClient(InternalPeer*)), _session, SLOT(addClient(InternalPeer*)));
     connect(_session, SIGNAL(sessionState(QVariant)), Core::instance(), SIGNAL(sessionState(QVariant)));
     emit initialized();
     exec();
index aacefce..b36b243 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -27,8 +27,8 @@
 #include "types.h"
 
 class CoreSession;
-class InternalConnection;
-class RemoteConnection;
+class InternalPeer;
+class RemotePeer;
 class QIODevice;
 
 class SessionThread : public QThread
@@ -54,8 +54,8 @@ signals:
     void initialized();
     void shutdown();
 
-    void addRemoteClient(RemoteConnection *);
-    void addInternalClient(InternalConnection *);
+    void addRemoteClient(RemotePeer *peer);
+    void addInternalClient(InternalPeer *peer);
 
 private:
     CoreSession *_session;
@@ -66,8 +66,8 @@ private:
 
     bool isSessionInitialized();
     void addClientToSession(QObject *peer);
-    void addRemoteClientToSession(RemoteConnection *connection);
-    void addInternalClientToSession(InternalConnection *client);
+    void addRemoteClientToSession(RemotePeer *remotePeer);
+    void addInternalClientToSession(InternalPeer *internalPeer);
 };
 
 
index 3df55d5..7dc5fea 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fb84b34..ea3c578 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e8bfe3b..ee19c20 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d8a8bba..dbf2802 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 49c6d33..38cb100 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 62de488..4654ddd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 86217b8..8d8dce0 100644 (file)
@@ -182,6 +182,11 @@ if(INDICATEQT_FOUND)
   include_directories(${INDICATEQT_INCLUDE_DIRS})
 endif(INDICATEQT_FOUND)
 
+if(HAVE_NOTIFICATION_CENTER)
+  set(SOURCES ${SOURCES} osxnotificationbackend.mm)
+  set(MOC_HDRS ${MOC_HDRS} osxnotificationbackend.h)
+endif()
+
 foreach(FORM ${FORMS})
   set(FORMPATH ${FORMPATH} ui/${FORM})
 endforeach(FORM ${FORMS})
index 7dabe23..e6721c6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -47,7 +47,7 @@ QString AboutDlg::about() const
 {
     QString res;
     res = tr("<b>A modern, distributed IRC Client</b><br><br>"
-             "&copy;2005-2012 by the Quassel Project<br>"
+             "&copy;2005-2013 by the Quassel Project<br>"
              "<a href=\"http://quassel-irc.org\">http://quassel-irc.org</a><br>"
              "<a href=\"irc://irc.freenode.net/quassel\">#quassel</a> on <a href=\"http://www.freenode.net\">Freenode</a><br><br>"
              "Quassel IRC is dual-licensed under <a href=\"http://www.gnu.org/licenses/gpl-2.0.txt\">GPLv2</a> and "
index a2e76ac..f2f8542 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f916e75..6016c7d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0c7f7c4..dccaa83 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e841ffd..bc98ea9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0288fbe..60bae8b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b0448e4..d632420 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d03327e..0ad7faf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8014ca9..97db220 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 74985a2..bb25fb2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8564266..cbbb54b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 59f027b..0bf8ee2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index addb2f1..ed931bd 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 96b0718..8fde09d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 17cdfd3..42dd04e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e8901e5..92aadc5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7d23b3d..480c1b5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6e79825..36e659c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3622634..7605d6b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 52a9c08..3fd5a2d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index efa6c49..2c73e35 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 899758d..464c6d5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 631e10d..2ae3d88 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4f6fcae..1de870e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ebd81b8..17dc074 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b175660..7869ab2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 321ebdd..2e43559 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1a12690..fe82284 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index cbbdcbb..8f3423d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6d8b8e8..fc67a76 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0624080..0b50be8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 723ed9a..66c0db5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6f79138..676ce94 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ce15c31..b984657 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 97fb6d8..9fbc074 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e5f66a2..bed887b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d28971e..fa57976 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index cea9304..a458578 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f43d6eb..ac4642e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e204b9c..f6432e6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2ab087e..0ab8a81 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b1783a9..24ba25f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e1430f2..81372dc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3ce70e2..7703fb8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5985180..66588ce 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 106db0b..c205092 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index eeffe7c..90716d5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 61e17a9..513c674 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 9074b16..655fd00 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 60f5bd0..b8fbe04 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bfc0a22..c246f2e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index dac2178..5fa4193 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index de6d0c6..2665f01 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a81e5fa..c545536 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index da55338..4c508ec 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b9b387d..394cdc9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 280c7dd..a3e706a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6fec76c..370b1ab 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 702e60e..d32e49b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1e37a5b..290f012 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a3048b2..bf7cda3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
   #include "indicatornotificationbackend.h"
 #endif
 
+#ifdef HAVE_NOTIFICATION_CENTER
+  #include "osxnotificationbackend.h"
+#endif
+
 #include "settingspages/aliasessettingspage.h"
 #include "settingspages/appearancesettingspage.h"
 #include "settingspages/backlogsettingspage.h"
@@ -218,6 +222,10 @@ void MainWin::init()
     QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this));
 #endif
 
+#ifdef HAVE_NOTIFICATION_CENTER
+    QtUi::registerNotificationBackend(new OSXNotificationBackend(this));
+#endif
+
     // we assume that at this point, all configurable actions are defined!
     QtUi::loadShortcuts();
 
index 07e4e63..9104654 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index dc3aee3..96290ce 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 79fb720..b739fae 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ab3bf02..69ca448 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -24,7 +24,7 @@
 #include "core.h"
 #include "qtui.h"
 
-class InternalConnection;
+class InternalPeer;
 
 MonolithicApplication::MonolithicApplication(int &argc, char **argv)
     : QtUiApplication(argc, argv),
@@ -70,6 +70,6 @@ void MonolithicApplication::startInternalCore()
     }
     Core *core = Core::instance();
     CoreConnection *connection = Client::coreConnection();
-    connect(connection, SIGNAL(connectToInternalCore(InternalConnection*)), core, SLOT(setupInternalClientSession(InternalConnection*)));
+    connect(connection, SIGNAL(connectToInternalCore(InternalPeer*)), core, SLOT(setupInternalClientSession(InternalPeer*)));
     connect(core, SIGNAL(sessionState(QVariant)), connection, SLOT(internalSessionStateReceived(QVariant)));
 }
index 198f07d..1ef8254 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0c8dfe0..8c719d8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 10c74fd..e1a7307 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0b67a9e..674e89d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f144e77..15b5a58 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
diff --git a/src/qtui/osxnotificationbackend.h b/src/qtui/osxnotificationbackend.h
new file mode 100644 (file)
index 0000000..55a8d58
--- /dev/null
@@ -0,0 +1,66 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#ifndef OSXNOTIFICATIONBACKEND_H_
+#define OSXNOTIFICATIONBACKEND_H_
+
+#include "abstractnotificationbackend.h"
+#include "settingspage.h"
+
+class OSXNotificationBackend : public AbstractNotificationBackend
+{
+    Q_OBJECT
+
+public:
+    OSXNotificationBackend(QObject *parent = 0);
+
+    void notify(const Notification &);
+    void close(uint notificationId);
+    virtual SettingsPage *createConfigWidget() const;
+
+private slots:
+    void enabledChanged(const QVariant &value);
+
+private:
+    class ConfigWidget;
+
+    bool _enabled;
+};
+
+class OSXNotificationBackend::ConfigWidget : public SettingsPage
+{
+    Q_OBJECT
+
+public:
+    ConfigWidget(QWidget *parent = 0);
+    void save();
+    void load();
+    bool hasDefaults() const;
+    void defaults();
+
+private slots:
+    void widgetChanged();
+
+private:
+    QCheckBox *_enabledBox;
+    bool _enabled;
+};
+
+#endif // OSXNOTIFICATIONBACKEND_H_
diff --git a/src/qtui/osxnotificationbackend.mm b/src/qtui/osxnotificationbackend.mm
new file mode 100644 (file)
index 0000000..738ee26
--- /dev/null
@@ -0,0 +1,126 @@
+/***************************************************************************
+ *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   devel@quassel-irc.org                                                 *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) version 3.                                           *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
+ ***************************************************************************/
+
+#include "clientsettings.h"
+#include "osxnotificationbackend.h"
+
+#include <QCheckBox>
+#include <QHBoxLayout>
+
+#import <Foundation/NSUserNotification.h>
+
+namespace {
+
+void SendNotificationCenterMessage(NSString* title, NSString* subtitle) {
+    NSUserNotificationCenter* center =
+            [NSUserNotificationCenter defaultUserNotificationCenter];
+    NSUserNotification* notification =
+            [[NSUserNotification alloc] init];
+
+    [notification setTitle: title];
+    [notification setSubtitle: subtitle];
+
+    [center deliverNotification: notification];
+
+    [notification release];
+}
+
+}
+
+OSXNotificationBackend::OSXNotificationBackend(QObject *parent)
+    : AbstractNotificationBackend(parent),
+      _enabled(true)
+{
+    NotificationSettings notificationSettings;
+    notificationSettings.initAndNotify("OSXNotification/Enabled", this, SLOT(enabledChanged(QVariant)), true);
+}
+
+void OSXNotificationBackend::enabledChanged(const QVariant &value)
+{
+    _enabled = value.toBool();
+}
+
+void OSXNotificationBackend::notify(const Notification &notification)
+{
+    if (!_enabled)
+    {
+        return;
+    }
+
+    NSString* message = [[NSString alloc] initWithUTF8String:notification.sender.toUtf8().constData()];
+    NSString* summary = [[NSString alloc] initWithUTF8String:notification.message.toUtf8().constData()];
+
+    SendNotificationCenterMessage(message, summary);
+
+    [message release];
+    [summary release];
+}
+
+void OSXNotificationBackend::close(uint notificationId)
+{
+}
+
+SettingsPage *OSXNotificationBackend::createConfigWidget() const
+{
+    return new ConfigWidget();
+}
+
+OSXNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent)
+    : SettingsPage("Internal", "OSXNotification", parent)
+{
+    _enabledBox = new QCheckBox(tr("Show OS X notifications"));
+    connect(_enabledBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged()));
+    QHBoxLayout *layout = new QHBoxLayout(this);
+    layout->addWidget(_enabledBox);
+}
+
+void OSXNotificationBackend::ConfigWidget::widgetChanged()
+{
+    bool changed = (_enabled != _enabledBox->isChecked());
+    if (changed != hasChanged())
+        setChangedState(changed);
+}
+
+bool OSXNotificationBackend::ConfigWidget::hasDefaults() const
+{
+    return true;
+}
+
+void OSXNotificationBackend::ConfigWidget::defaults()
+{
+    _enabledBox->setChecked(true);
+    widgetChanged();
+}
+
+void OSXNotificationBackend::ConfigWidget::load()
+{
+    NotificationSettings s;
+    _enabled = s.value("OSXNotification/Enabled", false).toBool();
+    _enabledBox->setChecked(_enabled);
+    setChangedState(false);
+}
+
+
+void OSXNotificationBackend::ConfigWidget::save()
+{
+    NotificationSettings s;
+    s.setValue("OSXNotification/Enabled", _enabledBox->isChecked());
+    load();
+}
index 72270a8..bcc7c76 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -20,7 +20,8 @@
 
 #include <QFileDialog>
 
-#include <phonon/mediaobject.h>
+#include <Phonon/MediaObject>
+#include <Phonon/BackendCapabilities>
 
 #include "phononnotificationbackend.h"
 
@@ -33,6 +34,7 @@ PhononNotificationBackend::PhononNotificationBackend(QObject *parent)
     : AbstractNotificationBackend(parent),
     _media(0)
 {
+    _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty();
     NotificationSettings notificationSettings;
     _enabled = notificationSettings.value("Phonon/Enabled", true).toBool();
     createMediaObject(notificationSettings.value("Phonon/AudioFile", QString()).toString());
@@ -51,9 +53,13 @@ PhononNotificationBackend::~PhononNotificationBackend()
 
 void PhononNotificationBackend::notify(const Notification &notification)
 {
-    if (_enabled && _media && (notification.type == Highlight || notification.type == PrivMsg)) {
-        _media->stop();
-        _media->play();
+    if (_enabled && (notification.type == Highlight || notification.type == PrivMsg)) {
+        if (_audioAvailable) {
+            _media->stop();
+            _media->play();
+        }
+        else
+            QApplication::beep();
     }
 }
 
@@ -92,8 +98,7 @@ void PhononNotificationBackend::createMediaObject(const QString &file)
         return;
     }
 
-    _media = Phonon::createPlayer(Phonon::NotificationCategory,
-        Phonon::MediaSource(file));
+    _media = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(file));
 }
 
 
@@ -104,6 +109,7 @@ PhononNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent)
     audioPreview(0)
 {
     ui.setupUi(this);
+    _audioAvailable = !Phonon::BackendCapabilities::availableAudioOutputDevices().isEmpty();
     ui.enabled->setIcon(SmallIcon("media-playback-start"));
     ui.play->setIcon(SmallIcon("media-playback-start"));
     ui.open->setIcon(SmallIcon("document-open"));
@@ -122,12 +128,20 @@ PhononNotificationBackend::ConfigWidget::~ConfigWidget()
 
 void PhononNotificationBackend::ConfigWidget::widgetChanged()
 {
-    ui.play->setEnabled(ui.enabled->isChecked() && !ui.filename->text().isEmpty());
+    if (! _audioAvailable) {
+        ui.play->setEnabled(ui.enabled->isChecked());
+        ui.open->setEnabled(false);
+        ui.filename->setEnabled(false);
+        ui.filename->setText(QString());
+    }
+    else {
+        ui.play->setEnabled(ui.enabled->isChecked() && !ui.filename->text().isEmpty());
 
-    bool changed = (enabled != ui.enabled->isChecked()
-                    || filename != ui.filename->text());
+        bool changed = (enabled != ui.enabled->isChecked() || filename != ui.filename->text());
 
-    if (changed != hasChanged()) setChangedState(changed);
+        if (changed != hasChanged())
+            setChangedState(changed);
+    }
 }
 
 
@@ -180,12 +194,15 @@ void PhononNotificationBackend::ConfigWidget::on_open_clicked()
 
 void PhononNotificationBackend::ConfigWidget::on_play_clicked()
 {
-    if (!ui.filename->text().isEmpty()) {
-        if (audioPreview)
-            delete audioPreview;
+    if (_audioAvailable) {
+        if (!ui.filename->text().isEmpty()) {
+            if (audioPreview)
+                delete audioPreview;
 
-        audioPreview = Phonon::createPlayer(Phonon::NotificationCategory,
-            Phonon::MediaSource(ui.filename->text()));
-        audioPreview->play();
+            audioPreview = Phonon::createPlayer(Phonon::NotificationCategory, Phonon::MediaSource(ui.filename->text()));
+            audioPreview->play();
+        }
     }
+    else
+        QApplication::beep();
 }
index 936aa10..b6ae1be 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -49,6 +49,7 @@ private:
     class ConfigWidget;
 
     bool _enabled;
+    bool _audioAvailable;
     Phonon::MediaObject *_media;
 };
 
@@ -75,6 +76,7 @@ private:
     Ui::PhononNotificationConfigWidget ui;
 
     bool enabled;
+    bool _audioAvailable;
     QString filename;
     Phonon::MediaObject *audioPreview;
 };
index 05f7363..9c7cbbf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bd11f9e..8ad7aa3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fc94e97..e13fa0f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 557379f..6f4a7e2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index cd41c1a..679705c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8e178be..3eab637 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 045b2b3..5b1012e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ed93b04..8335e83 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5769b4f..11f6c43 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index dbc9c34..f6651f9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4dbfae2..11a8bca 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 950e808..82cefdb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7cbbdbe..b978df6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index fb62d5f..471bbad 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index aed4c1a..a63ad06 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0e18ed7..a7b8562 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 49b3a81..3a9794b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ce9c207..0201f51 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ab6276a..1a66476 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7782825..c026a8f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7d3d90a..8afcbbc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3df6791..15f08b9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bb3c99f..f2ef7a1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e52e8de..880d538 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c27cbad..67c4b0b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index be15f71..26e22fc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b45f7f0..afbe444 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5500a84..0ec253f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index edec88a..4fcc70a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -85,6 +85,8 @@ QVariant ConnectionSettingsPage::loadAutoWidgetValue(const QString &widgetName)
         return config->autoWhoNickLimit();
     if (widgetName == "autoWhoDelay")
         return config->autoWhoDelay();
+    if (widgetName == "standardCtcp")
+        return config->standardCtcp();
 
     return SettingsPage::loadAutoWidgetValue(widgetName);
 }
@@ -109,6 +111,8 @@ void ConnectionSettingsPage::saveAutoWidgetValue(const QString &widgetName, cons
         config->requestSetAutoWhoNickLimit(value.toInt());
     else if (widgetName == "autoWhoDelay")
         config->requestSetAutoWhoDelay(value.toInt());
+    else if (widgetName == "standardCtcp")
+        config->requestSetStandardCtcp(value.toBool());
 
     else
         SettingsPage::saveAutoWidgetValue(widgetName, value);
index e3bb7dd..e417019 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 484454c..e1ca248 100644 (file)
      </layout>
     </widget>
    </item>
+   <item>
+    <widget class="QCheckBox" name="standardCtcp">
+     <property name="text">
+      <string>Enable standard-compliant CTCP behavior</string>
+     </property>
+     <property name="settingsKey" stdset="0">
+      <string notr="true" />
+     </property>
+    </widget>
+   </item>
    <item>
     <spacer name="verticalSpacer">
      <property name="orientation">
index 863b925..8709986 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f9a0c64..831ab5e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4113a4e..176386a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 91f27d1..d1be23b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d9e3d16..a915504 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 244eef7..3fd382c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 198b8ba..094e9e0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f8861ce..4ae1e6d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 27e0609..f670753 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d60199c..75db71f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d904009..876a141 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6e36c7b..8940dbf 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 832ddd9..d37ae94 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1a01a50..fc9931e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 93a10d2..737ae13 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d301336..d866b7c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ae1dd11..4ab43a4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6f597ad..8a9db1c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6e4fea6..88d600e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This class has been inspired by KDE's KKeySequenceWidget and uses     *
index 25971e7..3007578 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This class has been inspired by KDE's KKeySequenceWidget and uses     *
index 3aeaf70..4d66b6f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 
 NetworksSettingsPage::NetworksSettingsPage(QWidget *parent)
     : SettingsPage(tr("IRC"), tr("Networks"), parent)
+#ifdef HAVE_SSL
+      , _cid(0)
+#endif
 {
     ui.setupUi(this);
 
     // hide SASL options for older cores
     if (!(Client::coreFeatures() & Quassel::SaslAuthentication))
         ui.sasl->hide();
+    if (!(Client::coreFeatures() & Quassel::SaslExternal))
+        ui.saslExtInfo->hide();
+#ifndef HAVE_SSL
+    ui.saslExtInfo->hide();
+#endif
 
     // set up icons
     ui.renameNetwork->setIcon(SmallIcon("edit-rename"));
@@ -469,6 +477,20 @@ void NetworksSettingsPage::displayNetwork(NetworkId id)
     _ignoreWidgetChanges = true;
     if (id != 0) {
         NetworkInfo info = networkInfos[id];
+
+#ifdef HAVE_SSL
+        // this is only needed when the core supports SASL EXTERNAL
+        if (Client::coreFeatures() & Quassel::SaslExternal) {
+            if (_cid) {
+                disconnect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated()));
+                delete _cid;
+            }
+            _cid = new CertIdentity(*Client::identity(info.identity), this);
+            _cid->enableEditSsl(true);
+            connect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated()));
+        }
+#endif
+
         ui.identityList->setCurrentIndex(ui.identityList->findData(info.identity.toInt()));
         ui.serverList->clear();
         foreach(Network::Server server, info.serverList) {
@@ -506,6 +528,12 @@ void NetworksSettingsPage::displayNetwork(NetworkId id)
     }
     else {
         // just clear widgets
+#ifdef HAVE_SSL
+        if (_cid) {
+            disconnect(_cid, SIGNAL(sslSettingsUpdated()), this, SLOT(sslUpdated()));
+            delete _cid;
+        }
+#endif
         ui.identityList->setCurrentIndex(-1);
         ui.serverList->clear();
         ui.performEdit->clear();
@@ -549,6 +577,26 @@ void NetworksSettingsPage::saveToNetworkInfo(NetworkInfo &info)
 }
 
 
+#ifdef HAVE_SSL
+void NetworksSettingsPage::sslUpdated()
+{
+    if (_cid && !_cid->sslKey().isNull()) {
+        ui.saslAccount->setDisabled(true);
+        ui.saslAccountLabel->setDisabled(true);
+        ui.saslPassword->setDisabled(true);
+        ui.saslPasswordLabel->setDisabled(true);
+        ui.saslExtInfo->setHidden(false);
+    } else {
+        ui.saslAccount->setDisabled(false);
+        ui.saslAccountLabel->setDisabled(false);
+        ui.saslPassword->setDisabled(false);
+        ui.saslPasswordLabel->setDisabled(false);
+        ui.saslExtInfo->setHidden(true);
+    }
+}
+#endif
+
+
 /*** Network list ***/
 
 void NetworksSettingsPage::on_networkList_itemSelectionChanged()
index a658884..ef9f883 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -25,6 +25,7 @@
 
 #include "network.h"
 #include "settingspage.h"
+#include "clientidentity.h"
 
 #include "ui_networkssettingspage.h"
 #include "ui_networkadddlg.h"
@@ -65,6 +66,10 @@ private slots:
     void clientIdentityRemoved(IdentityId);
     void clientIdentityUpdated();
 
+#ifdef HAVE_SSL
+    void sslUpdated();
+#endif
+
     void on_networkList_itemSelectionChanged();
     void on_addNetwork_clicked();
     void on_deleteNetwork_clicked();
@@ -86,6 +91,9 @@ private:
     NetworkId currentId;
     QHash<NetworkId, NetworkInfo> networkInfos;
     bool _ignoreWidgetChanges;
+#ifdef HAVE_SSL
+    CertIdentity *_cid;
+#endif
 
     QPixmap connectedIcon, connectingIcon, disconnectedIcon;
 
index 7665e10..7ef574a 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>515</width>
-    <height>503</height>
+    <width>510</width>
+    <height>505</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -607,7 +607,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
               </widget>
              </item>
              <item row="1" column="0">
-              <widget class="QLabel" name="label_11">
+              <widget class="QLabel" name="saslPasswordLabel">
                <property name="enabled">
                 <bool>true</bool>
                </property>
@@ -617,7 +617,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
               </widget>
              </item>
              <item row="0" column="0">
-              <widget class="QLabel" name="label_10">
+              <widget class="QLabel" name="saslAccountLabel">
                <property name="enabled">
                 <bool>true</bool>
                </property>
@@ -629,6 +629,16 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
             </layout>
            </widget>
           </item>
+          <item>
+           <widget class="QLabel" name="saslExtInfo">
+            <property name="text">
+             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt; because the identity has an ssl certificate set, SASL EXTERNAL will be used.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            </property>
+            <property name="wordWrap">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
           <item>
            <spacer name="verticalSpacer_2">
             <property name="orientation">
index 7e587fb..2a79f67 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c1dca61..8fd6ae1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 309a1c2..76e029b 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 03ecf22..6f762b5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2ee0eee..4767983 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b6a0df3..dfd6c8a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a9bfaf8..40fd8df 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8a6fcfe..9eb9b52 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2e71dde..8a9584e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c4f48ef..e5827a8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1c0d7ec..1591e75 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5db021f..aaca86a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1aabb79..e0b6a49 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b3a1bed..ef372a9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1b6cb4a..e96cd4e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This contains code from KStatusNotifierItem, part of the KDE libs     *
index df95c46..30050b1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This contains code from KStatusNotifierItem, part of the KDE libs     *
index 5bae084..bb80eeb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 9556ce9..65b6e8d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2f2e11a..ae16ac2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1702838..8493d7c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5ffdf71..9d07bfa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b9e6dea..041125c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 67d439c..31385a0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5bc1c78..1acb20d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4af94b6..8b8e16d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index e41451c..2a6bc6c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bf82e5f..3ec7a96 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0327a71..7a11e20 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 37f231a..7ee7392 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a347bc7..f28d169 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3d93702..5c01603 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 12b0d4a..c35c838 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c79715f..e8eb141 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b75c9ff..56b58ae 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 810ac89..c392c28 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4c4e094..f2a4eb8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 983e385..9a8c7ad 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 81157a2..77b9dc0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a636879..58a6348 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 866cd94..5774eb3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 42dc813..da68eba 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2db49c0..f9dde62 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 2d80416..d48d7c4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 8afa877..ce7483e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 30839f6..f5ae444 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 462c323..5b816fb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index a90f8e8..9870fb5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 9849e2b..fda7377 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4a495e8..11d6239 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c5fc73d..5c4abb2 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3e70417..7338291 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 80e9af3..295256c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 34661e8..2bb635e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f8bab08..759fda1 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5c8572a..29327e8 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0df5692..e93be88 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d14a689..d0f6458 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index ca22d30..112d331 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index cef6459..81c5568 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index aa35807..0adf618 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 9ddbcb6..e9a3f5f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3c7b294..8a36e8c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 19a28c2..83b0ce5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This contains code from KStatusNotifierItem, part of the KDE libs     *
index dcd0394..eb7562d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 6324999..19e9f88 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index f186543..4cecb2a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4f37c32..f000d18 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 0efed6a..c5c01cc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   Based in part on KDE's kiconloader.h                                  *
index f106a19..0d4f30f 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index d306a3b..6d4dd3a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 05f630d..aed4af7 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 3eb729d..70daa53 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7eb6c53..1259b6a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4b44523..48fc5eb 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index bdec187..05515e6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7ddd2ba..21ffa02 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7463852..8d223d5 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index def0e12..716294e 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 237533b..01fda88 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c583892..c52b3ea 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index db5d20d..78c9502 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 5b7a8a1..7015469 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1a9d1d8..e5792b6 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1f2ffa1..3875ea0 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 4aae71a..1a56daa 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index b0dd215..a43498a 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index baae742..da6b074 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 7d1aa6a..3d3a1e9 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index c69ce08..a7ef447 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 391e037..a4e61c4 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 361572e..c8fce00 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 877b175..c1db196 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
index 1e78e38..df23a62 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -561,15 +561,43 @@ UiStyle::StyledString UiStyle::styleString(const QString &s_, quint32 baseFormat
 
 QString UiStyle::mircToInternal(const QString &mirc_)
 {
-    QString mirc = mirc_;
-    mirc.replace('%', "%%");    // escape % just to be sure
-    mirc.replace('\t', "        ");    // tabs break layout, also this is italics in Konversation
-    mirc.replace('\x02', "%B");
-    mirc.replace('\x0f', "%O");
-    mirc.replace('\x12', "%R");
-    mirc.replace('\x16', "%R");
-    mirc.replace('\x1d', "%S");
-    mirc.replace('\x1f', "%U");
+    QString mirc;
+    mirc.reserve(mirc_.size());
+    foreach (const QChar &c, mirc_) {
+        if ((c < '\x20' || c == '\x7f') && c != '\x03') {
+            switch (c.unicode()) {
+                case '\x02':
+                    mirc += "%B";
+                    break;
+                case '\x0f':
+                    mirc += "%O";
+                    break;
+                case '\x12':
+                case '\x16':
+                    mirc += "%R";
+                    break;
+                case '\x1d':
+                    mirc += "%S";
+                    break;
+                case '\x1f':
+                    mirc += "%U";
+                    break;
+                case '\x7f':
+                    mirc += QChar(0x2421);
+                    break;
+                default:
+                    mirc += QChar(0x2400 + c.unicode());
+            }
+        } else {
+            if (c == '\t') {
+                mirc += "        ";
+                continue;
+            }
+            if (c == '%')
+                mirc += c;
+            mirc += c;
+        }
+    }
 
     // Now we bring the color codes (\x03) in a sane format that can be parsed more easily later.
     // %Dcfxx is foreground, %Dcbxx is background color, where xx is a 2 digit dec number denoting the color code.
index fd05974..993aab3 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2012 by the Quassel Project                        *
+ *   Copyright (C) 2005-2013 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *