projects
/
NeonServV5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97fcc6c
)
use low priority bot if there is no preferred one
author
pk910
<philipp@zoelle1.de>
Sun, 2 Oct 2011 16:31:37 +0000
(18:31 +0200)
committer
pk910
<philipp@zoelle1.de>
Sun, 2 Oct 2011 16:31:37 +0000
(18:31 +0200)
src/modcmd.c
patch
|
blob
|
history
diff --git
a/src/modcmd.c
b/src/modcmd.c
index 5476d5e00a9798fff30610f4f01c2f5f70a4465c..4b1d2cc1eeeb767b7fb9663874980c5e00f4cec9 100644
(file)
--- a/
src/modcmd.c
+++ b/
src/modcmd.c
@@
-53,12
+53,16
@@
static int get_binds_index(char first_char) {
}
struct ClientSocket* get_prefered_bot(int botid) {
}
struct ClientSocket* get_prefered_bot(int botid) {
- struct ClientSocket *client;
+ struct ClientSocket *client
, *lowbot = NULL
;
for(client = getBots(SOCKET_FLAG_READY, NULL); client; client = getBots(SOCKET_FLAG_READY, client)) {
for(client = getBots(SOCKET_FLAG_READY, NULL); client; client = getBots(SOCKET_FLAG_READY, client)) {
- if(client->botid == botid && (client->flags & SOCKET_FLAG_PREFERRED))
- return client;
+ if(client->botid == botid) {
+ if((client->flags & SOCKET_FLAG_PREFERRED))
+ return client;
+ else
+ lowbot = client;
+ }
}
}
- return
NULL
;
+ return
lowbot
;
}
static char* get_channel_trigger(int botid, struct ChanNode *chan) {
}
static char* get_channel_trigger(int botid, struct ChanNode *chan) {