-/* 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
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;
}
+ if(chanuser->user->flags & USERFLAG_ISBOT) return;
loadChannelSettings(chanuser->chan);
if(!(chanuser->chan->flags & CHANFLAG_CHAN_REGISTERED)) return;
char *ban;
}
}
//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;