mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 509
L
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
Joined: Jan 2003
Posts: 2,523
Q
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

Link Copied to Clipboard