1 // ServerQueueItem.H -*- C++ -*-
2 // Copyright (c) 1998 Etienne BERNARD
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef SERVERQUEUEITEM_H
20 #define SERVERQUEUEITEM_H
22 class ServerQueueItem {
24 int priority, penalty, type;
27 CHANNELMODE, USERMODE, INVITE, JOIN, KICK,
28 NICK, NOTICE, PART, PASS, PING, PONG, PRIVMSG,
29 QUIT, TOPIC, USER, USERHOST, WHO, WHOIS, OTHER
32 ServerQueueItem(int, int, int);
33 virtual ~ServerQueueItem() { }
35 virtual bool merge(ServerQueueItem *) { return false; }
36 virtual String getLine() = 0;
38 bool operator< (const ServerQueueItem & item);
40 friend class ServerQueue;
43 ServerQueueItem(const ServerQueueItem &);
47 class ServerQueueOtherItem : public ServerQueueItem {
51 ServerQueueOtherItem(String, int, int, int);
55 class ServerQueueChannelModeItem : public ServerQueueItem {
62 ServerQueueChannelModeItem(String, String, String);
63 bool merge(ServerQueueItem *);
67 class ServerQueueKickItem : public ServerQueueItem {
74 ServerQueueKickItem(String, String, String);
75 bool merge(ServerQueueItem *);
79 class ServerQueueNoticeItem : public ServerQueueItem {
85 ServerQueueNoticeItem(String, String);
86 bool merge(ServerQueueItem *);