/* proto-bahamut.c - IRC protocol output
* Copyright 2000-2004 srvx Development Team
*
- * This program is free software; you can redistribute it and/or modify
+ * This file is part of srvx.
+ *
+ * srvx is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version. Important limitations are
- * listed in the COPYING file that accompanies this software.
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, email srvx-maintainers@srvx.net.
+ * along with srvx; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#include "proto-common.c"
putsock(":%s NOTICE %s :%s", from->nick, to, message);
}
+void
+irc_notice_user(struct userNode *from, struct userNode *to, const char *message) {
+ putsock(":%s NOTICE %s :%s", from->nick, to->nick, message);
+}
+
void
irc_wallchops(UNUSED_ARG(struct userNode *from), UNUSED_ARG(const char *to), UNUSED_ARG(const char *message)) {
}
if (!add)
change->args[ch_arg].mode |= MODE_REMOVE;
victim = GetUserH(modes[in_arg++]);
+ if (!victim)
+ continue;
if ((change->args[ch_arg].member = GetUserMode(channel, victim)))
ch_arg++;
break;
}
+ default:
+ if (!(flags & MCP_FROM_SERVER))
+ goto error;
+ break;
}
}
change->argc = argc; /* in case any turned out to be ignored */
+ if (change->modes_set & MODE_SECRET) {
+ change->modes_set &= ~(MODE_PRIVATE);
+ change->modes_clear |= MODE_PRIVATE;
+ } else if (change->modes_set & MODE_PRIVATE) {
+ change->modes_set &= ~(MODE_SECRET);
+ change->modes_clear |= MODE_SECRET;
+ }
return change;
error:
mod_chanmode_free(change);
char int_buff[32];
unsigned int arg;
+ assert(change->argc <= change->alloc_argc);
memset(&chbuf, 0, sizeof(chbuf));
chbuf.channel = channel;
chbuf.actor = who;
mod_chanmode_format(struct mod_chanmode *change, char *outbuff)
{
unsigned int used = 0;
+ assert(change->argc <= change->alloc_argc);
if (change->modes_clear) {
outbuff[used++] = '-';
#define DO_MODE_CHAR(BIT, CHAR) if (change->modes_clear & MODE_##BIT) outbuff[used++] = CHAR