projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed game_uno +2/+4 timeout handling
[NeonServV5.git]
/
src
/
bots.c
diff --git
a/src/bots.c
b/src/bots.c
index aaddcb705b1e34b89c1bb2dc975d98005e0b3d04..7da678c97ffb3b4a185f9b0dea6b74f3c69431ae 100644
(file)
--- a/
src/bots.c
+++ b/
src/bots.c
@@
-1,4
+1,4
@@
-/* bots.c - NeonServ v5.
5
+/* bots.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
@@
-26,6
+26,8
@@
#include "modcmd.h"
#include "DBHelper.h"
#include "IRCEvents.h"
#include "modcmd.h"
#include "DBHelper.h"
#include "IRCEvents.h"
+#include "tools.h"
+#include "log.h"
struct cmd_bot_alias {
int botid;
struct cmd_bot_alias {
int botid;
@@
-190,7
+192,7
@@
void requestOp(struct UserNode *user, struct ChanNode *chan) {
}
void requestInvite(struct UserNode *user, struct ChanNode *chan) {
}
void requestInvite(struct UserNode *user, struct ChanNode *chan) {
- struct ClientSocket *bot
, *userbot = NULL
;
+ struct ClientSocket *bot;
struct ChanUser *chanuser = getChanUser(user, chan);
char invited = 0;
if(chanuser) return;
struct ChanUser *chanuser = getChanUser(user, chan);
char invited = 0;
if(chanuser) return;
@@
-199,9
+201,6
@@
void requestInvite(struct UserNode *user, struct ChanNode *chan) {
invited = 1;
putsock(bot, "INVITE %s %s", user->nick, chan->name);
}
invited = 1;
putsock(bot, "INVITE %s %s", user->nick, chan->name);
}
- if(bot->user == user) {
- userbot = bot;
- }
}
}
}
}
@@
-277,7
+276,7
@@
void set_bot_alias(int botid, char *alias) {
}
botalias = malloc(sizeof(*botalias));
if (!botalias) {
}
botalias = malloc(sizeof(*botalias));
if (!botalias) {
- p
error("malloc() failed"
);
+ p
rintf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return;
}
botalias->botid = botid;
return;
}
botalias->botid = botid;