mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I have a script which uses /ban -uN to ban users. The problem arrives when the bans either don't get set because of the IRCD, or when the ban is already removed by someone else before the N seconds are up. In both cases, mIRC unbans bans that don't even exist (anymore). Is there a possibility of adding a check into this command to only remove the ban if it still exists?

Loc


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Well it might be the long way around it, but having a timer with an alias could accomplish this.. Ex:

Code:
/ban <params>
.timer [ $+ [ <nick> ] $+ ] . [ $+ [ <chan ] ] 1 <delay> /unbanUsr <chan> <nick|mask>


then have the timer point to something

Code:
alias unbanUsr {
  if ($2 isban $1) /mode $1 -b $2
}


its a long way around it, but its possible. I myself had to rewrite a few mode changes for a revenge script i had made. The problem was just after i'd have been kicked i'd get several messages saying "you are not a operator on this channel", "no external messages", etc. Iw ould have to wait for them to all clear before i could rejoin and clear the problem user.

Well, my script worked by like taking the long way around.. Maybe this can help you. >:D


-KingTomato
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
OP Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
I had thought of that myself. I didn't wanna use it because a] it's more code b] it'll get a crapload of timers running. I remember times when this code would've started over 50 timers. Dunno how mirc would cope with that.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Link Copied to Clipboard