mIRC Homepage
Posted By: THE_ADZ ON BAN - 23/01/07 12:51 AM
I want to make a script that if a certain nick is banned to unban it...but ONLY if the ban reason was a specific reason.

Code:
on 1:BAN:#avatarrp: {
if ($banmask == *Crystal*) || if ($banmask == *Krystal*)
{ if ($nick == ADZBot) }
/mode -b Crystal | /mode -b Krystal


That's all I got as of yet frown
Posted By: Kurdish_Assass1n Re: ON BAN - 23/01/07 01:30 AM
ok, when you use astericks, use "iswm", I haven't tested this script, but, i think it should work.
*note: not good with on ban at all, lol

Code:
Code:
on *:BAN:#avatarrp: {
  if (*Krystal* iswm $bnick) { mode $chan -b $banmask }
  if (*Crystal* iswm $bnick) { mode $chan -b $banmask }
}

Hope this works.
Posted By: landonsandor Re: ON BAN - 23/01/07 02:09 AM
to take this a tad further (and nothing against your coding Kurdish), you could also do this:

Code:
on *:BAN:#avatarrp: {
  if (*Krystal* iswm $bnick) || (*Crystal* iswm $bnick) { mode $chan -b $banmask }
}



As for the ban reason, you'd have to utilize the KICK reason in an on kick event. An EXAMPLEM (untested) would be:

Code:
on @*:kick:#avatarrp: {
  if (because I said so == $1-) { /unban the stored address used for the ban placed a moment ago }
}



That is an example of HOW to do it, this was merely example coding and will NOT work as coded
Posted By: Kurdish_Assass1n Re: ON BAN - 23/01/07 02:39 AM
Originally Posted By: Kurdish_Assass1n
ok, when you use astericks, use "iswm", I haven't tested this script, but, i think it should work.
*note: not good with on ban at all, lol

Code:
Code:
on *:BAN:#avatarrp: {
  if (*Krystal* iswm $bnick) { mode $chan -b $banmask }
  if (*Crystal* iswm $bnick) { mode $chan -b $banmask }
}

Hope this works.


lol, wow, what was I thinking when I did the double if statement and they did the same command!? lol, thanks for telling me landonsandor.
Posted By: landonsandor Re: ON BAN - 23/01/07 04:11 AM
oh hey, happens to the best of us smile and btw, to the original poster, you'd want to change the event to be like this:

Code:
on @*:ban:#avatarrp: {
  if (*Krystal* iswm $bnick) || (*Crystal* iswm $bnick) { mode $chan -b $banmask }
}


.... so it only happens IF you're an op. Also, the BAN vs ban doesnt matter, I just like using lowercase on events though when I first started out I used caps - it doesnt matter though.
© mIRC Discussion Forums