mIRC Homepage
Posted By: hoaxer bug in timers??? - 10/12/02 05:36 PM
it's an alias
/protect /timer1 0 3600 /mode #funsite.be +mnt

to set every hour the channel settings to +mnt

but it do nothing

if i do
/protect /timer1 0 3600 /msg $chan test

I say every hour "test" in that channel ....
what's the problem ??? It's just the same thing ...
Posted By: Merlin Re: bug in timers??? - 10/12/02 05:40 PM
1. /protect is a command in mIRC - read /help /protect
2. Are you sure you have +o in the channel? Channel mode changes requires Operator status smile
Posted By: hoaxer Re: bug in timers??? - 10/12/02 06:46 PM
I have changed the /protect command and i'm sure i have +o but it is a problem with the server ... on other server it seems to work ....
Posted By: starbucks_mafia Re: bug in timers??? - 10/12/02 08:15 PM
If those modes are already set, some IRCd's will show you attempt to set them again, others won't - are you sure that's not the problem?
Posted By: DarkStarX Re: bug in timers??? - 10/12/02 09:53 PM
Umm...if I'm not mistaken:

$chan is set when a channel related event is fired, and cannot be used in an alias. Wouldn't it be $null?

Regards,
Posted By: hoaxer Re: bug in timers??? - 10/12/02 10:04 PM
That's the problem I think smile
Posted By: DarkStarX Re: bug in timers??? - 11/12/02 01:52 AM
That's not a bug though smile
$chan refers to the channel that the fired event occured in. A timer is a mIRC based object..global if you will, and does not occur in a channel.

Regards,
Posted By: Cobra Re: bug in timers??? - 11/12/02 07:45 AM
just to clearify

although i dont recomend useing $chan and such in aliases, but rather simply sending the proper parms to them, you CAN use them in aliases provided that the aliases are called by an event :P

and even in timers in aliases that are called by an event where $chan will resolve as the $chan identifer will resolve before the timer is set .. although in this case, the alias was not called by an event so obviously $chan would be $null

Cobra^
Posted By: SyN Re: bug in timers??? - 11/12/02 08:26 PM
I'd suggest any alias use $1 and pass the $chan as a param from the event.

as for an alias being named the same as a mirc internal command that is ok as custom aliases have precedence over mircs internal commands. the opposite being true for internal identifiers and custom identifiers.
© mIRC Discussion Forums