Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 29a70700 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Remove irc as it didn't work in kde4 => not necessary to port it

parent 138a6158
......@@ -9,7 +9,6 @@ option(WITH_gadu "Enable Kopete Gadu-Gadu protocol" ON)
option(WITH_jabber "Enable Kopete Jabber protocol" ON)
option(WITH_libjingle "Enable Kopete Jabber libjingle support" ON)
option(WITH_bonjour "Enable Kopete Bonjour protocol" ON)
option(WITH_irc "Enable Kopete IRC protocol" OFF)
option(WITH_wlm "Enable Window Live Messenger support" ON)
option(WITH_WLM_MEDIASTREAMER "Enable Windows Live Messenger voice clip support" ON)
option(WITH_meanwhile "Enable Kopete meanwhile protocol" ON)
......@@ -61,10 +60,6 @@ endif(WITH_yahoo AND JASPER_FOUND)
if(WITH_qq)
add_subdirectory( qq )
endif(WITH_qq)
if(WITH_irc)
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: WARNING: Building the irc plugin, even if it hasn't been completely ported yet")
add_subdirectory( irc )
endif(WITH_irc)
if(NOT WIN32)
if(WITH_winpopup)
add_subdirectory( winpopup )
......
add_subdirectory( icons )
add_subdirectory( libkirc )
include_directories(
${KOPETE_INCLUDES}
${CMAKE_CURRENT_SOURCE_DIR}/libkirc/client
${CMAKE_CURRENT_SOURCE_DIR}/libkirc/kernel
${CMAKE_CURRENT_SOURCE_DIR}/ui/
${CMAKE_CURRENT_BINARY_DIR}/ui/
)
set(kopeteirc_ui_SRCS
# ui/channellist.cpp
# ui/channellistdialog.cpp
ui/ircaddcontactpage.cpp
# ui/ircdialogs.cpp
ui/irceditaccountwidget.cpp
ui/networkconfigwidget.cpp
)
ki18n_wrap_ui(kopeteirc_ui_SRCS
ui/ircadd.ui
ui/irceditaccount.ui
ui/networkconfig.ui
)
set(kopete_irc_SRCS
${kopeteirc_ui_SRCS}
ircaccount.cpp
ircconst.cpp
irccontact_channel.cpp
irccontact.cpp
irccontact_server.cpp
irccontact_user.cpp
ircguiclient.cpp
ircnetwork.cpp
ircprotocol.cpp
# irctransferhandler.cpp
ksparser.cpp
)
add_library(kopete_irc MODULE ${kopete_irc_SRCS})
target_link_libraries(kopete_irc KF5::KIOCore ${QT_QT3SUPPORT_LIBRARY} kopete kirc_client kirc )
install(TARGETS kopete_irc DESTINATION ${KDE_INSTALL_PLUGINDIR})
############ Test Files #################
########### install files ###############
install( FILES kopete_irc.desktop irc.protocol DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install( FILES ircchatui.rc DESTINATION ${KDE_INSTALL_DATADIR}/kopete_irc)
install( FILES ircnetworks.xml DESTINATION ${KDE_INSTALL_DATADIR}/kopete)
ecm_install_icons( ${KDE_INSTALL_DATADIR}/kopete/icons )
[Protocol]
exec=kopete %u
protocol=irc
input=none
output=none
helper=true
listing=
reading=false
writing=false
makedir=false
deleting=false
Icon=irc_normal
This diff is collapsed.
/*
ircaccount.h - IRC Account
Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
Copyright (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.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) any later version. *
* *
*************************************************************************
*/
#ifndef IRCACCOUNT_H
#define IRCACCOUNT_H
#include "ircnetwork.h"
#include "kircsocket.h"
#include "kopetepasswordedaccount.h"
#include "kopetemessage.h"
class IRCContact;
namespace KIrc {
class ClientSocket;
class Event;
}
namespace Kopete {
class Contact;
class Message;
class ChatSession;
class MetaContact;
}
class KActionMenu;
class IRCAccount : public Kopete::PasswordedAccount
{
Q_OBJECT
Q_PROPERTY(int codecMib READ codecMib WRITE setCodecFromMib)
Q_PROPERTY(QString networkName READ networkName WRITE setNetworkByName)
Q_PROPERTY(QString userName READ userName WRITE setUserName)
Q_PROPERTY(QString realName READ realName WRITE setRealName)
// Q_PROPERTY(QString password READ password WRITE setPassword)
Q_PROPERTY(QString nickName READ nickName WRITE setNickName)
// Q_PROPERTY(QStringList nickNames READ nickNames WRITE setNickNames)
Q_PROPERTY(QString partMessage READ partMessage WRITE setPartMessage)
Q_PROPERTY(QString quitMessage READ quitMessage WRITE setQuitMessage)
Q_PROPERTY(bool autoShowServerWindow READ autoShowServerWindow WRITE setAutoShowServerWindow)
public:
explicit IRCAccount(const QString &accountid, const QString &autoConnect = QString(), const QString &networkName = QString(), const QString &nickName = QString());
virtual ~IRCAccount();
public: // READ properties accessors.
int codecMib() const;
const QString networkName() const;
const QString userName() const;
const QString realName() const;
const QString nickName() const;
// const QString altNick() const;
const QString partMessage() const;
const QString quitMessage() const;
bool autoShowServerWindow() const;
public slots: // WRITE properties accessors.
void setCodecFromMib(int mib);
void setNetworkByName(const QString &);
void setUserName(const QString &);
void setRealName(const QString &);
void setNickName(const QString &);
void setPartMessage(const QString &);
void setQuitMessage(const QString &);
void setAutoShowServerWindow(bool autoShow);
public:
// Returns the KIRC engine instance
KIrc::ClientSocket *client() const;
QTextCodec *codec() const;
void setCodec(QTextCodec *codec);
// IRCNetwork network();
const QStringList connectCommands() const;
void setConnectCommands(const QStringList &) const;
public:
QMap< QString, QString > customCtcp() const;
void setCustomCtcpReplies(const QMap< QString, QString > &replies);
const QMap<QString, QString> customCtcpReplies() const;
void setCurrentCommandSource(Kopete::ChatSession *session);
Kopete::ChatSession *currentCommandSource();
IRCContact *getContact(const QByteArray &name, Kopete::MetaContact *metac = 0);
IRCContact *getContact(const KIrc::EntityPtr &entity, Kopete::MetaContact *metac = 0);
QList<Kopete::Contact *> getContacts(const KIrc::EntityList &entities);
virtual void fillActionMenu(KActionMenu *actionMenu);
/** Reimplemented from Kopete::Account */
virtual void setOnlineStatus(const Kopete::OnlineStatus &status, const Kopete::StatusMessage &statusMessage, const OnlineStatusOptions &options = None);
virtual void setStatusMessage(const Kopete::StatusMessage &statusMessage);
// Returns the Kopete::Contact of the user
IRCContact *mySelf() const;
// Returns the Kopete::Contact of the server of the user
IRCContact *myServer() const;
public slots:
virtual void setAway(bool isAway, const QString &awayMessage = QString());
virtual void connectWithPassword(const QString &);
virtual void disconnect()
{
quit();
} // REMOVE ME ASAP
public slots:
void quit(const QString &quitMessage = QString());
protected:
virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact);
private slots:
void clientConnectionStateChanged(KIrc::Socket::ConnectionState newstate);
void destroyed(IRCContact *contact);
void receivedEvent(QEvent *event);
void slotPerformOnConnectCommands();
void slotShowServerWindow();
void slotJoinChannel();
private:
void clientSetup();
void clientConnect();
void appendMessage(IRCContact *from, QList<Kopete::Contact *> to, const QString &text, Kopete::Message::MessageType type);
private:
Q_DISABLE_COPY(IRCAccount)
class Private;
Private *const d;
};
#endif
<!DOCTYPE kpartgui>
<kpartgui version="26" name="kopetechatwindow">
<MenuBar>
<Menu name="irc" >
<text>IRC</text>
<ActionList name="irccontactactionlist" />
</Menu>
</MenuBar>
</kpartgui>
/*
ircconst.cpp - The IRC constants & enums.
Copyright (c) 2005-2007 by Michel Hermier <michel.hermier@gmail.com>
Kopete (c) 2005-2007 by the Kopete developers <kopete-devel@kde.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) any later version. *
* *
*************************************************************************
*/
#include "ircconst.h"
#include <kaboutdata.h>
#include <KLocalizedString>
using namespace Kopete;
/* The usage of the namespace, instead of the "using" keyword, is intentional.
* Not using it introduce compiler confusion, and lead to new symbols declaration.
*/
namespace IRC {
/*
const QString Version = I18N_NOOP("Kopete IRC Plugin %1 [http://kopete.kde.org]",
KGlobal::mainComponent().aboutData()->version());
*/
namespace Config {
//const QLatin1String AUTOSHOWSERVERWINDOW("AutoShowServerWindow");
const QLatin1String CODECMIB("Codec");
const QLatin1String NETWORKNAME("NetworkName");
const QLatin1String NICKNAME("NickName");
const QLatin1String USERNAME("UserName");
const QLatin1String REALNAME("RealName");
} // IRC::Config
namespace Properties {
/*
const ContactPropertyTmpl ChannelTopic(QLatin1String("channelTopic"), i18n("Topic"), QString(), false, true );
const ContactPropertyTmpl ChannelMembers(QLatin1String("channelMembers"), i18n("Members"));
const ContactPropertyTmpl ChannelHomepage(QLatin1String("homePage"), i18n("Home Page"));
//const ContactPropertyTmpl LastSeen(Kopete::Global::IRC::Properties::self()->lastSeen());
const ContactPropertyTmpl UserInfo(QLatin1String("userInfo"), i18n("IRC User"));
const ContactPropertyTmpl Server(QLatin1String("ircServer"), i18n("IRC Server"));
const ContactPropertyTmpl Channels( QLatin1String("ircChannels"), i18n("IRC Channels"));
const ContactPropertyTmpl Hops(QLatin1String("ircHops"), i18n("IRC Hops"));
const ContactPropertyTmpl FullName(QLatin1String("FormattedName"), i18n("Full Name"));
const ContactPropertyTmpl IsIdentified(QLatin1String("identifiedUser"), i18n("User Is Authenticated"));
*/
} // IRC::Properties
} // IRC
/*
ircconst.h - The IRC constants & enums.
Copyright (c) 2005-2007 by Michel Hermier <michel.hermier@gmail.com>
Kopete (c) 2005-2007 by the Kopete developers <kopete-devel@kde.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) any later version. *
* *
*************************************************************************
*/
#ifndef IRCCONST_H
#define IRCCONST_H
#include "kopeteproperty.h"
namespace IRC {
enum ChatSessionType
{
SERVER,
CHANNEL,
DCC
};
extern const QString Version;
namespace Config {
//extern const QLatin1String AUTOSHOWSERVERWINDOW;
extern const QLatin1String CODECMIB;
extern const QLatin1String NETWORKNAME;
extern const QLatin1String NICKNAME;
extern const QLatin1String USERNAME;
extern const QLatin1String REALNAME;
} // namespace IRC::Config
namespace Properties {
// irc channnel-contact properties
extern const Kopete::PropertyTmpl ChannelHomepage;
extern const Kopete::PropertyTmpl ChannelMembers;
extern const Kopete::PropertyTmpl ChannelTopic;
// irc user-contact properties
//extern const Kopete::ContactPropertyTmpl LastSeen;
extern const Kopete::PropertyTmpl UserInfo;
extern const Kopete::PropertyTmpl Server;
extern const Kopete::PropertyTmpl Channels;
extern const Kopete::PropertyTmpl Hops;
extern const Kopete::PropertyTmpl FullName;
extern const Kopete::PropertyTmpl IsIdentified;
} // namespace IRC::Properties
} // namespace IRC
#endif
This diff is collapsed.
/*
irccontact.h - IRC Contact
Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
Copyright (c) 2003-2007 by Michel Hermier <michel.hermier@gmail.com>
Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.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) any later version. *
* *
*************************************************************************
*/
#ifndef IRCCONTACT_H
#define IRCCONTACT_H
#include "ircconst.h"
#include "kircglobal.h"
#include "kopetecontact.h"
#include "kopetemessage.h"
#include <QMap>
class IRCAccount;
namespace KIrc {
class ClientSocket;
}
namespace Kopete {
class ChatSession;
class MetaContact;
}
class QTextCodec;
/**
* @author Jason Keirstead <jason@keirstead.org>
* @author Michel Hermier <michel.hermier@gmail.com>
*/
class IRCContact : public Kopete::Contact
{
Q_OBJECT
public:
typedef QList<IRCContact *> List;
IRCContact(IRCAccount *account, const KIrc::EntityPtr &entity, Kopete::MetaContact *metac = 0, const QString &icon = QString());
~IRCContact();
IRCAccount *ircAccount() const;
KIrc::ClientSocket *kircClient() const;
QString caption() const;
KIrc::EntityPtr entity() const;
/**
* This function attempts to find the nickname specified within the current chat
* session. Returns a pointer to that IRCUserContact, or 0L if the user does not
* exist in this session. More useful for channels. Calling IRCChannelContact::locateUser()
* for example tells you if a user is in a certain channel.
*/
Kopete::Contact *locateUser(const QString &nickName);
bool isReachable();
/**
* return true if the contact is in a chat. false if the contact is in no chats
* that loop over all manager, and checks the presence of the user
*/
bool isChatting(Kopete::ChatSession *avoid = 0L) const;
Kopete::ChatSession *manager(CanCreateFlags cancreate = CannotCreate);
Kopete::ChatSession *chatSession(IRC::ChatSessionType type = IRC::SERVER, CanCreateFlags cancreate = CannotCreate);
void appendMessage(Kopete::Message &);
QTextCodec *codec();
/**
* We serialise the contactId and the server group in 'contactId'
* so that other IRC programs reading this from KAddressBook have a chance of figuring
* which server the contact relates to
*/
void serialize(QMap<QString, QString> &serializedData, QMap<QString, QString> &addressBookData);
signals:
void destroyed(IRCContact *self);
public slots:
void updateStatus();
void setCodec(QTextCodec *codec);
private slots:
void entityUpdated();
void slotSendMsg(Kopete::Message &message, Kopete::ChatSession *chatSession);
QString sendMessage(const QString &msg);
void chatSessionDestroyed(Kopete::ChatSession *chatSession);
void deleteContact();
private:
Q_DISABLE_COPY(IRCContact)
class Private;
Private *const d;
};
#endif
This diff is collapsed.
/*
ircchannelcontact.h - IRC Channel Contact
Copyright (c) 2002 by Nick Betcher <nbetcher@kde.org>
Copyright (c) 2003 by Jason Keirstead <jason@keirstead.org>
Kopete (c) 2002 by the Kopete developers <kopete-devel@kde.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) any later version. *
* *
*************************************************************************
*/
#ifndef IRCCONTACT_CHANNEL_H
#define IRCCONTACT_CHANNEL_H
#include "irccontact.h"
#include <QList>
class QAction;
class KActionMenu;
class KCodecAction;
class KToggleAction;
class IRCAccount;
namespace Kopete {
class MetaContact;
}
/**
* @author Jason Keirstead <jason@keirstead.org>
*
* This class is the @ref Kopete::Contact object representing IRC Channels, not users.
* It is derrived from IRCContact where much of its functionality is shared with @ref IRCUserContact.
*/
class IRCChannelContact : public IRCContact
{
friend class IRCSignalMapper;
public:
IRCChannelContact(IRCAccount *, KIRC::EntityPtr entity, Kopete::MetaContact *metac);
~IRCChannelContact();
/**
* Returns the current topic for this channel.
*/
const QString &topic() const
{
return mTopic;
}
/* Set password for a channel */
void setPassword(const QString &password)
{
mPassword = password;
}
/* Get password for a channel */
const QString &password() const
{
return mPassword;
}
/**
* Returns if a mode is enabled for this channel.
* @param mode The mode you want to check ( 't', 'n', etc. )
* @param value This is a pointer to a QString which is set to
* the value of the mode if it has one. Example, the mode 'l' or
* the mode 'k'. If the mode has no such value then the pointer
* is always returned null.
*/
bool modeEnabled(QChar mode, QString *value = 0);
// Kopete::Contact stuff
virtual QList<QAction *> *customContextMenuActions();
virtual const QString caption() const;
//Methods handled by the signal mapper
void userJoinedChannel(const QString &user);
void userPartedChannel(const QString &user, const QString &reason);
void userKicked(const QString &nick, const QString &nickKicked, const QString &reason);
void channelTopic(