2008-08-31 09:08:24 +00:00
|
|
|
#include <QTabWidget>
|
|
|
|
#include <QString>
|
|
|
|
#include <QStringList>
|
|
|
|
#include <QPointer>
|
2009-04-17 05:05:43 +00:00
|
|
|
#include <ircclient.h>
|
|
|
|
#include <dccserver.h>
|
|
|
|
#include <mirc.h>
|
2008-08-31 09:08:24 +00:00
|
|
|
#include "chatwindow.h"
|
|
|
|
|
|
|
|
class MessageHandler : public QTabWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
private:
|
|
|
|
IRCClient *irc;
|
|
|
|
QHash< QString, ChatWindow* > windows;
|
|
|
|
QHash< QString, QVariant > variables;
|
|
|
|
int DCCPortMin;
|
|
|
|
int DCCPortMax;
|
|
|
|
bool DCCSendAhead;
|
|
|
|
QHash< int, DCCServer* > DCCServers;
|
|
|
|
QHash< QString, int > DCCNicks;
|
2009-04-17 05:05:43 +00:00
|
|
|
MIRCScriptManager *scriptManager;
|
2008-08-31 09:08:24 +00:00
|
|
|
|
|
|
|
void _addWindow( QString name, QString defaultCmd = "", bool focusOnOpen = false );
|
|
|
|
QString parseVar( QString text );
|
|
|
|
public:
|
|
|
|
MessageHandler( IRCClient *irc, QWidget *parent = 0 );
|
2009-04-17 05:05:43 +00:00
|
|
|
|
2009-05-05 21:10:34 +00:00
|
|
|
void alias_connect(QStringList args);
|
|
|
|
void alias_ctcp(QStringList args);
|
|
|
|
void alias_dcc(QStringList args);
|
|
|
|
void alias_echo(QStringList args);
|
2009-04-17 05:05:43 +00:00
|
|
|
void alias_join(QStringList args);
|
|
|
|
void alias_msg(QStringList args);
|
2009-05-05 21:10:34 +00:00
|
|
|
void alias_nick(QStringList args);
|
|
|
|
void alias_notice(QStringList args);
|
|
|
|
void alias_quit(QStringList args);
|
2008-08-31 09:08:24 +00:00
|
|
|
public slots:
|
|
|
|
void messageRcvd( QString type, QString src, QString dest, QStringList values, QString text );
|
|
|
|
void messageSentDCC( QString nickName, QString text );
|
|
|
|
void messageRcvdDCC( QString nickName, QString text );
|
|
|
|
void processCmd( QString cmdText );
|
|
|
|
void autoRun();
|
|
|
|
void startDCC( QString nickName, QString fileName = "" );
|
|
|
|
void connectedDCCChat( QString nickName );
|
|
|
|
|
|
|
|
void rcvdRAW( QString text );
|
|
|
|
void sentRAW( QString text );
|
|
|
|
signals:
|
|
|
|
void dispatchMessage( QString window, QString src, QString message );
|
|
|
|
};
|
|
|
|
|