1 /***************************************************************************
2 * Copyright (C) 2005-07 by the Quassel IRC Team *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef _IRCSERVERHANDLER_H_
22 #define _IRCSERVERHANDLER_H_
24 #include "basichandler.h"
26 class IrcServerHandler : public BasicHandler {
30 IrcServerHandler(Server *parent = 0);
33 void handleServerMsg(QByteArray rawMsg);
35 QString serverDecode(const QByteArray &string);
36 QStringList serverDecode(const QList<QByteArray> &stringlist);
37 QString bufferDecode(const QString &bufferName, const QByteArray &string);
38 QStringList bufferDecode(const QString &bufferName, const QList<QByteArray> &stringlist);
39 QString userDecode(const QString &userNick, const QByteArray &string);
40 QStringList userDecode(const QString &userNick, const QList<QByteArray> &stringlist);
44 void handleJoin(QString, QList<QByteArray>);
45 void handleKick(QString, QList<QByteArray>);
46 void handleMode(QString, QList<QByteArray>);
47 void handleNick(QString, QList<QByteArray>);
48 void handleNotice(QString, QList<QByteArray>);
49 void handlePart(QString, QList<QByteArray>);
50 void handlePing(QString, QList<QByteArray>);
51 void handlePrivmsg(QString, QList<QByteArray>);
52 void handleQuit(QString, QList<QByteArray>);
53 void handleTopic(QString, QList<QByteArray>);
55 void handle001(QString, QList<QByteArray>); // RPL_WELCOME
56 void handle005(QString, QList<QByteArray>); // RPL_ISUPPORT
57 void handle331(QString, QList<QByteArray>); // RPL_NOTOPIC
58 void handle332(QString, QList<QByteArray>); // RPL_TOPIC
59 void handle333(QString, QList<QByteArray>); // Topic set by...
60 void handle353(QString, QList<QByteArray>); // RPL_NAMREPLY
61 void handle432(QString, QList<QByteArray>); // ERR_ERRONEUSNICKNAME
62 void handle433(QString, QList<QByteArray>); // ERR_NICKNAMEINUSE
64 void defaultHandler(QString cmd, QString prefix, QList<QByteArray> params);