Skip to content
General IRCX

Ircx Timers

A TG007 community discussion started by RiverRat.

Closed discussion 10 posts
Page 1 of 1
Closed
Topic #8209 · 10 published posts · 2,333 views

From experience timers cannot be used on IRCx because mIRC takes $chan as a variable.

Is there a way to use $chan with timers on IRCx?

Can you give us a sample of the coding you wish to use with the timer?

Just a simple { timer 1 5 msg $chan Blah Blah }

If channels on your network use the %# syntax you may need to remove the % or $chr(37) and replace it in different instances.

 

I remember this issue on MSN. Those who used pre-built connections like Vincula or NuclearMSN may not have noticed since the connections took care of the issue for you.

timers dont work with $chan

cause you could be in more than one chan and it wouldnt know which one to send the message to

 

you could use /amsg in a timer i think

or set the $chan as a variable and then use that to message the room

Edited Mar 24, 2007 11:18 PM by Ozzy10

My code does NOT have bugs. It just develops random features.

timers dont work with $chan

cause you could be in more than one chan and it wouldnt know which one to send the message to

 

you could use /amsg in a timer i think

or set the $chan as a variable and then use that to message the room

 

$chan would be evaluated when the timer command is used, not when the timer fires, so it would from any event/location that $chan exists in.

 

However, your variable idea would be the best way to do this. Something like this would work well:

 

on *:join:#:{ 
  set %chan $chan
  .timerblah 1 5 dowhatever 
}
alias dowhatever { 
  msg %chan hello 
  unset %chan
}

.timerblah 1 5 msg $!chr(37) $!+ $mid($chan, 2) hello

Notice how he said IRCx. Not an MSN lookalike.

Ive used aliases fine with timers.

 

.timer $+ $chan 1 42 doit $nick $chan

 

alias doit {

if ($1 ison $2) kick $2 $1 you have been pwned by $me

}

Ive used aliases fine with timers.

 

.timer $+ $chan 1 42 doit $nick $chan

 

alias doit {

if ($1 ison $2) kick $2 $1 you have been pwned by $me

}

 

That's fine, but he said the channels start with a %. Timers evaluate things twice so mIRC will interpret %#channel as a variable. To avoid that you can use the code provided by me or Psycho.

 

Psycho's method is shorter but I find it more kludgy. It's much harder to read.