* 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
struct neonserv_event_join_cache {
struct ClientSocket *client;
struct ChanUser *chanuser;
struct neonserv_event_join_cache {
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) {
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);
- cache->was_registering = (user->flags & USERFLAG_WAS_REGISTRING);
- get_userauth(user, neonserv_event_join_nick_lookup, cache);
+ get_userauth(user, module_id, neonserv_event_join_nick_lookup, cache);
}
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;
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;
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)) {
sprintf(nameBuf, "dynlimit_%s", chan->name);
if(!timeq_name_exists(nameBuf)) {
//neonserv_event_join_dynlimit
sprintf(nameBuf, "dynlimit_%s", chan->name);
if(!timeq_name_exists(nameBuf)) {
//neonserv_event_join_dynlimit
- timeq_add_name(nameBuf, 30, neonserv_event_join_dynlimit, strdup(chan->name));
+ timeq_add_name(nameBuf, 30, module_id, neonserv_event_join_dynlimit, strdup(chan->name));