#include "stdinc.h"
#include "channel.h"
+#include "chmode.h"
#include "client.h"
#include "common.h"
#include "hash.h"
#include "s_newconf.h"
#include "logger.h"
+struct config_channel_entry ConfigChannel;
+rb_dlink_list global_channel_list;
+static rb_bh *channel_heap;
+static rb_bh *ban_heap;
+static rb_bh *topic_heap;
+static rb_bh *member_heap;
+
static int channel_capabs[] = { CAP_EX, CAP_IE,
CAP_SERVICE,
CAP_TS6
if(client_p->servptr == &me)
rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
- chptr->users_last = rb_current_time();
-
if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
destroy_channel(chptr);
if(client_p->servptr == &me)
rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
- chptr->users_last = rb_current_time();
-
if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
destroy_channel(chptr);
source_p->localClient->oper_warn_count_down--;
else
source_p->localClient->oper_warn_count_down = 0;
- if(source_p->localClient->oper_warn_count_down == 0)
+ if(source_p->localClient->oper_warn_count_down == 0 &&
+ name != NULL)
{
/* Its already known as a possible spambot */
- if(name != NULL)
- sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
- "User %s (%s@%s) trying to join %s is a possible spambot",
- source_p->name,
- source_p->username, source_p->orighost, name);
- else
- sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
- "User %s (%s@%s) is a possible spambot",
- source_p->name,
- source_p->username, source_p->orighost);
+ sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
+ "User %s (%s@%s) trying to join %s is a possible spambot",
+ source_p->name,
+ source_p->username, source_p->orighost, name);
source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN;
}
}
"Network rejoined, deactivating splitmode");
rb_event_delete(check_splitmode_ev);
+ check_splitmode_ev = NULL;
}
}
}
}
}
-const struct mode_letter chmode_flags[] =
-{
- {MODE_INVITEONLY, 'i'},
- {MODE_MODERATED, 'm'},
- {MODE_NOPRIVMSGS, 'n'},
- {MODE_PRIVATE, 'p'},
- {MODE_SECRET, 's'},
- {MODE_TOPICLIMIT, 't'},
- {MODE_NOCOLOR, 'c'},
- {MODE_FREEINVITE, 'g'},
- {MODE_OPMODERATE, 'z'},
- {MODE_EXLIMIT, 'L'},
- {MODE_PERMANENT, 'P'},
- {MODE_FREETARGET, 'F'},
- {MODE_DISFORWARD, 'Q'},
- {MODE_REGONLY, 'r'},
- {0, '\0'}
-};
-
/* channel_modes()
*
* inputs - pointer to channel
*mbuf++ = '+';
*pbuf = '\0';
- for (i = 0; chmode_flags[i].mode; ++i)
- if(chptr->mode.mode & chmode_flags[i].mode)
- *mbuf++ = chmode_flags[i].letter;
+ for (i = 0; i < 256; i++)
+ if(chptr->mode.mode & chmode_flags[i])
+ *mbuf++ = i;
if(chptr->mode.limit)
{
|| ((nocap & mode_changes[i].nocaps) != mode_changes[i].nocaps))
continue;
- arg = mode_changes[i].id;
+ if(!EmptyString(mode_changes[i].id))
+ arg = mode_changes[i].id;
+ else
+ arg = mode_changes[i].arg;
if(arg)
{