if (mdir == 1)
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'o', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'o', parameters[param], true, 1));
if (!MOD_RESULT)
{
log(DEBUG,"calling give_ops");
else
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'o', parameters[param], false, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'o', parameters[param], false, 1));
if (!MOD_RESULT)
{
log(DEBUG,"calling take_ops");
if (mdir == 1)
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'h', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'h', parameters[param], true, 1));
if (!MOD_RESULT)
{
r = give_hops(user,parameters[param++],chan,status);
else
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'h', parameters[param], false, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'h', parameters[param], false, 1));
if (!MOD_RESULT)
{
r = take_hops(user,parameters[param++],chan,status);
if (mdir == 1)
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'v', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'v', parameters[param], true, 1));
if (!MOD_RESULT)
{
r = give_voice(user,parameters[param++],chan,status);
else
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'v', parameters[param], false, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'v', parameters[param], false, 1));
if (!MOD_RESULT)
{
r = take_voice(user,parameters[param++],chan,status);
if (mdir == 1)
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'b', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'b', parameters[param], true, 1));
if (!MOD_RESULT)
{
r = add_ban(user,parameters[param++],chan,status);
else
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'b', parameters[param], false, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'b', parameters[param], false, 1));
if (!MOD_RESULT)
{
r = take_ban(user,parameters[param++],chan,status);
if (!strcmp(chan->key,""))
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'k', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'k', parameters[param], true, 1));
if (!MOD_RESULT)
{
strcat(outlist,"k");
first 32 characters */
char key[MAXBUF];
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'k', parameters[param], false, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'k', parameters[param], false, 1));
if (!MOD_RESULT)
{
strlcpy(key,parameters[param++],MAXBUF);
if (mdir == 0)
{
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'l', "", false, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 'l', "", false, 0));
if (!MOD_RESULT)
{
if (chan->limit)
break;
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'l', parameters[param], true, 1));
+ FOREACH_RESULT(OnRawMode(user, chan, 'l', parameters[param], true, 1));
if (!MOD_RESULT)
{
case 'i':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'i', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 'i', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->inviteonly != mdir)
case 't':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 't', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 't', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->topiclock != mdir)
case 'n':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'n', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 'n', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->noexternal != mdir)
case 'm':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'm', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 'm', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->moderated != mdir)
case 's':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 's', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 's', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->secret != mdir)
case 'p':
MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, 'p', "", mdir, 0));
+ FOREACH_RESULT(OnRawMode(user, chan, 'p', "", mdir, 0));
if (!MOD_RESULT)
{
if (chan->c_private != mdir)
std::string para = "";
if (p.size())
para = p[0];
- FOREACH_RESULT(OnRawMode(user, modechar, para, mdir, pcnt));
+ FOREACH_RESULT(OnRawMode(user, chan, modechar, para, mdir, pcnt));
if (!MOD_RESULT)
{
for (int i = 0; i <= MODCOUNT; i++)
{
/* just /modes #channel */
WriteServ(user->fd,"324 %s %s +%s",user->nick, Ptr->name, chanmodes(Ptr));
+ WriteServ(user->fd,"329 %s %s %d", user->nick, Ptr->name, Ptr->created);
return;
}
else
if (*mode == '+')
mode++;
int MOD_RESULT = 0;
- FOREACH_RESULT(OnRawMode(user, *mode, "", false, 0));
+ FOREACH_RESULT(OnRawMode(user, Ptr, *mode, "", false, 0));
if (!MOD_RESULT)
{
if (*mode == 'b')