mIRC Home    About    Download    Register    News    Help

Print Thread
#166710 14/12/06 12:23 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Any way to halt /!command ? i want dont want people to be able to halt my aliases, how can i do that? if (/! isin $1) dosent work, so any ideas?

Joined: Feb 2006
Posts: 523
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2006
Posts: 523
no since as you discovered, on input doesn't trigger for /!commands. why do you want to stop users from using them? i certainly wouldn't want to use a script that didn't let me do what i wanted.. and /!command is a specific indication that you dont want aliases interfering


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Cos people complain about my script, then when i ask what they have problem with, after a while i was thinking "hmm, sounds like the timers dosent work as they should", then when i have asked they halted ALL timers /timers off, when i asked why they tell me "I did that when i halted a timer in org mirc", and this makes everything stop work as it should, and without the timers i cant check if the timers running, /timers off halt all active timers, then i cant have somethin that check if a serten timer are off or on, if (!$timer(timer)) { do stuff } ..

Joined: Oct 2003
Posts: 284
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 284
...and how would disabling /!command help with that? If they don't understand that typing /timers off disables *all* timers, I doubt they know that typing /!timers off will do the trick if you have overridden /timers.

Sais #166749 14/12/06 09:08 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Everyone can get that from a friend, i have disabled /timers off so far, and if someone tell them /!timers off, then it will f*k up the script.. smirk how ever /timer1 off will work..

Sais #166750 14/12/06 09:10 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
I'd have to agree... if people don't understand that /timers off turns all timers off, then that's their fault and not your script's fault. You shouldn't need to cater to someone who turns all the timers off.

Joined: Oct 2003
Posts: 284
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 284
And if you were to override /timers, then you can ensure that only those timers not relevant to your script are being turned off, and then your users shouldn't even notice the issue.

Sais #166761 14/12/06 09:50 PM
Joined: Feb 2003
Posts: 3,412
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
users maybe start there own timers, so cant turn that off, then they cant disable there own timers.. so only /timers off .. not /timer off

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
So teach them how to turn off their own timers. smile

Joined: Oct 2003
Posts: 284
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 284
I had something like:

Code:
on *:start: { 
  set %my.timers mytimer1 mytimer2
}

alias runtimers {
  timermytimer1 1 3600 echo -a This is mytimer1 expiring
  timermytimer2 3 900 echo -a This is mytimer1 expiring
}

alias timers {
  if ($1 != off) { !timers $1- | return }
  ;; check for my timers

  var %n = $timer(0)
  while (%n) {
    if (!$istok(%my.timers,$timer(%n),32)) {
      timer $+ $timer(%n) off
    }
    dec %n 
  }
}


in mind. Doesn't turn your own timers off, but it does turn any others off. Of course, you'd then have to know in advance what all your timers were going to be called, or add and remove them dynamically.

And it still means they can be turned off with /!timers off (which imho is a Good Thing)


Link Copied to Clipboard