projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rewrote IRC cache parser to be (hopefully) more stable
[NeonServV5.git]
/
src
/
modules
/
NeonServ.mod
/
event_neonserv_join.c
diff --git
a/src/modules/NeonServ.mod/event_neonserv_join.c
b/src/modules/NeonServ.mod/event_neonserv_join.c
index e2c54a57994b9995ea00c3b4f84a396f8ac96038..ea0ce3fc729ce6620f85c6209bdf28a6d8668a75 100644
(file)
--- a/
src/modules/NeonServ.mod/event_neonserv_join.c
+++ b/
src/modules/NeonServ.mod/event_neonserv_join.c
@@
-18,11
+18,10
@@
struct neonserv_event_join_cache {
struct ClientSocket *client;
struct ChanUser *chanuser;
struct neonserv_event_join_cache {
struct ClientSocket *client;
struct ChanUser *chanuser;
- int was_registering;
};
static USERAUTH_CALLBACK(neonserv_event_join_nick_lookup);
};
static USERAUTH_CALLBACK(neonserv_event_join_nick_lookup);
-static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanUser *chanuser
, int was_registering
);
+static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanUser *chanuser);
static TIMEQ_CALLBACK(neonserv_event_join_dynlimit);
static void neonserv_event_join(struct ChanUser *chanuser) {
static TIMEQ_CALLBACK(neonserv_event_join_dynlimit);
static void neonserv_event_join(struct ChanUser *chanuser) {
@@
-31,6
+30,7
@@
static void neonserv_event_join(struct ChanUser *chanuser) {
if(!client) return; //we can't "see" this event
if(chanuser->user == client->user) {
requestOp(client->user, chanuser->chan);
if(!client) return; //we can't "see" this event
if(chanuser->user == client->user) {
requestOp(client->user, chanuser->chan);
+ module_neonbackup_recover_chan(chanuser->chan);
return;
}
if(chanuser->user->flags & USERFLAG_ISBOT) return;
return;
}
if(chanuser->user->flags & USERFLAG_ISBOT) return;
@@
-58,21
+58,19
@@
static void neonserv_event_join(struct ChanUser *chanuser) {
}
cache->client = client;
cache->chanuser = chanuser;
}
cache->client = client;
cache->chanuser = chanuser;
- cache->was_registering = (user->flags & USERFLAG_WAS_REGISTRING);
get_userauth(user, module_id, neonserv_event_join_nick_lookup, cache);
} else
get_userauth(user, module_id, neonserv_event_join_nick_lookup, cache);
} else
- neonserv_event_join_async1(client, chanuser
, (user->flags & USERFLAG_WAS_REGISTRING)
);
+ neonserv_event_join_async1(client, chanuser);
}
static USERAUTH_CALLBACK(neonserv_event_join_nick_lookup) {
struct neonserv_event_join_cache *cache = data;
}
static USERAUTH_CALLBACK(neonserv_event_join_nick_lookup) {
struct neonserv_event_join_cache *cache = data;
- if(user) {
- neonserv_event_join_async1(cache->client, cache->chanuser, cache->was_registering);
- }
+ if(user)
+ neonserv_event_join_async1(cache->client, cache->chanuser);
free(cache);
}
free(cache);
}
-static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanUser *chanuser
, int was_registering
) {
+static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanUser *chanuser) {
struct ClientSocket *textclient = ((client->flags & SOCKET_FLAG_PREFERRED) ? client : get_prefered_bot(client->botid));
struct ChanNode *chan = chanuser->chan;
struct UserNode *user = chanuser->user;
struct ClientSocket *textclient = ((client->flags & SOCKET_FLAG_PREFERRED) ? client : get_prefered_bot(client->botid));
struct ChanNode *chan = chanuser->chan;
struct UserNode *user = chanuser->user;
@@
-139,7
+137,7
@@
static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanU
if(a)
b = a+2;
} while(a);
if(a)
b = a+2;
} while(a);
- if(greetingPos &&
(!was_registering || *row[2])
)
+ if(greetingPos &&
*row[2]
)
reply(textclient, user, "[%s] %s", chan->name, greeting);
//USER RIGHTS
if(!(userflags & DB_CHANUSER_NOAUTOOP)) {
reply(textclient, user, "[%s] %s", chan->name, greeting);
//USER RIGHTS
if(!(userflags & DB_CHANUSER_NOAUTOOP)) {