projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed cmd_users output filter
[NeonServV5.git]
/
src
/
IRCQueue.c
diff --git
a/src/IRCQueue.c
b/src/IRCQueue.c
index 673adff27b2e6884943cdd1bd2522d078aa116d8..a7cc1a4d00fd52521ba0cc108a3db83c9dbf0d69 100644
(file)
--- a/
src/IRCQueue.c
+++ b/
src/IRCQueue.c
@@
-1,4
+1,4
@@
-/* IRCQueue.c - NeonServ v5.
5
+/* IRCQueue.c - NeonServ v5.
6
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
@@
-17,6
+17,8
@@
#include "IRCQueue.h"
#include "ClientSocket.h"
#include "IOHandler.h"
#include "IRCQueue.h"
#include "ClientSocket.h"
#include "IOHandler.h"
+#include "tools.h"
+#include "log.h"
#define MAXPENALTY 8 /* 4 messages */
#define MAXPENALTY 8 /* 4 messages */
@@
-40,7
+42,7
@@
static IOHANDLER_CALLBACK(queue_callback);
static struct BotQueue *initialize_queue(struct ClientSocket *client) {
struct BotQueue *queue = malloc(sizeof(*queue));
if (!queue) {
static struct BotQueue *initialize_queue(struct ClientSocket *client) {
struct BotQueue *queue = malloc(sizeof(*queue));
if (!queue) {
- p
error("malloc() failed"
);
+ p
rintf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return NULL;
}
queue->client = client;
return NULL;
}
queue->client = client;
@@
-130,7
+132,7
@@
int queue_add(struct ClientSocket *client, char* msg, int len) {
} else {
struct QueueEntry *entry = malloc(sizeof(*entry));
if (!entry) {
} else {
struct QueueEntry *entry = malloc(sizeof(*entry));
if (!entry) {
- p
error("malloc() failed"
);
+ p
rintf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return 0;
}
entry->msg = strdup(msg);
return 0;
}
entry->msg = strdup(msg);