// ServerQueueItem.C -*- C++ -*-
// Copyright (c) 1998 Etienne BERNARD
+// Copyright (c) 2005 Clinton Ebadi
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301, USA.
#include "StringTokenizer.H"
#include "ServerQueue.H"
: priority(pr), penalty(pen), type(t)
{ }
-
-
ServerQueueOtherItem::ServerQueueOtherItem(String l, int pr,
int pen, int t)
: ServerQueueItem(pr, pen, t), line(l)
{ }
+bool ServerQueueItem::operator< (const ServerQueueItem & item)
+{
+ // lower numeric priority is higher priority
+ return item.priority < priority;
+}
+
String
ServerQueueOtherItem::getLine()
{
return line;
}
-
-
ServerQueueChannelModeItem::ServerQueueChannelModeItem(String c, String m, String p)
: ServerQueueItem(CHANNELMODE_PRIORITY,
CHANNELMODE_PENALTY,
channel(c), mode(m), parameters(p)
{
StringTokenizer st(p);
- paramcount = st.countTokens();
+ paramcount = st.count_tokens();
}
bool