mIRC Home    About    Download    Register    News    Help

Print Thread
Combining on unban events for -bbb... #180487 10/07/07 07:41 AM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline OP
Fjord artisan
OP Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
I have an unban event script that while loops unban events.

Works like this.

* Operator sets mode: -b host
Unban affects: nicks, separated, by, commmas.
Unban also affects: nicks, outside, the, channel.

But when I have something like..

* Operator sets mode: -bbbb host1 host2 host3 host4
Unban affects: Nicks
Unban affects: Nicks
Unban affects: Nicks
Unban affects: Nicks

Of course, most of the time bans affect only 1 nick, only bans like a* b* c* does it list more than 1..

So I'd kind of like to combine each -bbb as 1 individual on unban event and while loop that instead..

It seems I would have to make variables in several on unban events to combine them all..

Because it's common knowledge that mIRC treats -bbbb as each individual event.

Thanks.

-Neal.

Re: Combining on unban events for -bbb... [Re: LostShadow] #180502 10/07/07 12:57 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Do something like this. It will reset the timer for each ban, so will be able to do them all at once 2 seconds after the ban.

Code:
on *:unban:#: {
  set %unban.list $addtok(%unban.list,$chr(32) $+ $banmask,44)
  .timerUnbanEffect 1 2 DisplayUnbanEffect $chan
}

alias DisplayUnbanEffect {
  echo $1 Unban affects: %unban.list
  unset %unban.list
}


Invision Support
#Invision on irc.irchighway.net
Re: Combining on unban events for -bbb... [Re: Riamus2] #180507 10/07/07 01:22 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Passing unknown content (including $chan) to /timer is dangerous. In this case, this would do the trick:
Code:
.timerUnbanEffect 1 2 DisplayUnbanEffect $!decode( $encode(#,m) ,m)

However, there's a simpler way of tracking multiple bans set in one /mode command, and this is the on RAWMODE event. mirc even provides the very handy $mode() identifier, which allows you to loop through any modes (one would loop through $mode(N).ban in this case, from 1 to $mode(0).ban).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com