projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git]
/
src
/
event_neonserv_join.c
diff --git
a/src/event_neonserv_join.c
b/src/event_neonserv_join.c
index c38cdddae487c8197916f872e7dee4644d2c1ff5..84845f3d9266f0626ff7e58c53d6d0e11b66e158 100644
(file)
--- a/
src/event_neonserv_join.c
+++ b/
src/event_neonserv_join.c
@@
-1,5
+1,5
@@
-/* event_neonserv_join.c - NeonServ v5.
2
- * Copyright (C) 2011 Philipp Kreil (pk910)
+/* event_neonserv_join.c - NeonServ v5.
3
+ * Copyright (C) 2011
-2012
Philipp Kreil (pk910)
*
* 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
*
* 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
@@
-29,10
+29,11
@@
static void neonserv_event_join(struct ChanUser *chanuser) {
struct UserNode *user = chanuser->user;
struct ClientSocket *client = getBotForChannel(chanuser->chan);
if(!client) return; //we can't "see" this event
struct UserNode *user = chanuser->user;
struct ClientSocket *client = getBotForChannel(chanuser->chan);
if(!client) return; //we can't "see" this event
- if(
user->flags & USERFLAG_ISBOT
) {
-
putsock(client, "MODE %s +o %s", chanuser->chan->name, chanuser->user->nick
);
+ if(
chanuser->user == client->user
) {
+
requestOp(client->user, chanuser->chan
);
return;
}
return;
}
+ if(chanuser->user->flags & USERFLAG_ISBOT) return;
loadChannelSettings(chanuser->chan);
if(!(chanuser->chan->flags & CHANFLAG_CHAN_REGISTERED)) return;
char *ban;
loadChannelSettings(chanuser->chan);
if(!(chanuser->chan->flags & CHANFLAG_CHAN_REGISTERED)) return;
char *ban;
@@
-172,7
+173,7
@@
static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanU
}
}
//AUTOINVITE
}
}
//AUTOINVITE
- if((user->flags & USERFLAG_ISAUTHED) &&
!chanuserrow || !strcmp(chanuserrow[3], "0") || time(0) - atol(chanuserrow[3]) >= 30
) {
+ if((user->flags & USERFLAG_ISAUTHED) &&
(!chanuserrow || !strcmp(chanuserrow[3], "0") || time(0) - atol(chanuserrow[3]) >= 30)
) {
//check if it's the first channel, the user is seen by the bot (IMPORTANT: ignore other bot's channel!)
char first_chan = 1;
char bot_in_chan;
//check if it's the first channel, the user is seen by the bot (IMPORTANT: ignore other bot's channel!)
char first_chan = 1;
char bot_in_chan;