HCoop
/
clinton
/
bobotpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make Scheme hooks and timers threadsafe
[clinton/bobotpp.git]
/
source
/
ServerQueueItem.C
diff --git
a/source/ServerQueueItem.C
b/source/ServerQueueItem.C
index
8fa879f
..
8daf8c4
100644
(file)
--- a/
source/ServerQueueItem.C
+++ b/
source/ServerQueueItem.C
@@
-14,7
+14,8
@@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301, USA.
#include "StringTokenizer.H"
#include "ServerQueue.H"
#include "StringTokenizer.H"
#include "ServerQueue.H"
@@
-24,21
+25,23
@@
ServerQueueItem::ServerQueueItem(int pr, int pen, int t)
: priority(pr), penalty(pen), type(t)
{ }
: priority(pr), penalty(pen), type(t)
{ }
-
-
ServerQueueOtherItem::ServerQueueOtherItem(String l, int pr,
int pen, int t)
: ServerQueueItem(pr, pen, t), line(l)
{ }
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;
}
String
ServerQueueOtherItem::getLine()
{
return line;
}
-
-
ServerQueueChannelModeItem::ServerQueueChannelModeItem(String c, String m, String p)
: ServerQueueItem(CHANNELMODE_PRIORITY,
CHANNELMODE_PENALTY,
ServerQueueChannelModeItem::ServerQueueChannelModeItem(String c, String m, String p)
: ServerQueueItem(CHANNELMODE_PRIORITY,
CHANNELMODE_PENALTY,