X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fevent_neonserv_join.c;h=1140d94a6c825bfd059a14fee972d48bc2a53a97;hb=78e040af3fcc36ab684611c0f98b4381ff420878;hp=5f8d1440237321d666847a207e310274aa1bd8fe;hpb=ee3a72eb4a412a0a504d070db1b41c6907f7604d;p=NeonServV5.git diff --git a/src/modules/NeonServ.mod/event_neonserv_join.c b/src/modules/NeonServ.mod/event_neonserv_join.c index 5f8d144..1140d94 100644 --- a/src/modules/NeonServ.mod/event_neonserv_join.c +++ b/src/modules/NeonServ.mod/event_neonserv_join.c @@ -1,4 +1,4 @@ -/* event_neonserv_join.c - NeonServ v5.4 +/* event_neonserv_join.c - NeonServ v5.5 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -18,11 +18,10 @@ struct neonserv_event_join_cache { struct ClientSocket *client; struct ChanUser *chanuser; - int was_registering; }; 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) { @@ -59,21 +58,19 @@ static void neonserv_event_join(struct 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 - 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; - 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); } -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; @@ -140,7 +137,7 @@ static void neonserv_event_join_async1(struct ClientSocket *client, struct ChanU 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)) {