#include <arpa/inet.h>
#endif
-
#define OPSERV_CONF_NAME "services/opserv"
#define KEY_ALERT_CHANNEL "alert_channel"
return; /* channel is invite only */
}
- if (channel->members.used >= channel->limit) {
- return; /* channel is invite on */
+ if (channel->limit > 0) {
+ if (channel->members.used >= channel->limit) {
+ return; /* channel is invite on */
+ }
}
if (*channel->key) {
reply("OSMSG_ALERTS_BAR");
for (it = dict_first(opserv_user_alerts); it; it = iter_next(it)) {
alert = iter_data(it);
- if(m && (!match_ircglob(alert->text_discrim, m) && strcasecmp(alert->owner, m)) )
+ if(m && (!match_ircglob(alert->text_discrim, m) && strcasecmp(alert->owner, m) && strcasecmp(iter_key(it), m)))
continue; /* not a match to requested filter */
switch (alert->reaction) {
case REACT_NOTICE: reaction = "notice"; break;
if(text[0] == '\001') {
text++;
cmd = mysep(&text, " ");
- if(!irccasecmp(cmd, "VERSION")) {
+ if(cmd && !irccasecmp(cmd, "VERSION")) {
char *version = mysep(&text, "\n");
if(!version)
version = "";
return 1; /* channel is invite only */
}
- if (channel->members.used >= channel->limit) {
- return 1; /* channel is invite on */
+ if (channel->limit > 0) {
+ if (channel->members.used >= channel->limit) {
+ return 1; /* channel is invite on */
+ }
}
if (*channel->key) {