mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
In my clone scanner I need to be able to edit variables from dialog, but when a nick joins channel I get this:
has joined #test 5(Clone of: %cnicks $+ )

Code:
%join.clone.scan.out1 who is a clone of %cnicks
%join.clone.scan.out2 5(Clone of: %cnicks $+ )


Code:
on ^!*:join:#:{
  if (%join.clone.scan == on) && ($len($nick) > 2) && ($ialchan($wildsite,#,0) > 1) {
    var %x = $calc($v1 -1), %n = 1, %cnicks
    while ($ialchan($wildsite,#,%n).nick) {
      if ($v1 != $nick) { var %cnicks = %cnicks $v1 }
      inc %n
    }
    if (%x > 1) {
      var %cnicks = $replace($gettok(%cnicks,1--2,32),$chr(32),$+($chr(44),$chr(32))) and $gettok(%cnicks,-1,32)
    }
    if %join.clone.scan.layout == 1 {
      echo -ltc join # * $nick ( $+ $address $+ ) has joined # %join.clone.scan.out1
    }
    if %join.clone.scan.layout == 2 {
      echo -ltc join # * $nick ( $+ $address $+ ) has joined # %join.clone.scan.out2
    }
    haltdef
  }
}

Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
hi
/help $eval


WorldDMT
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
I can't get it to work. This is one of the options I tryed:

Code:
%join.clone.scan.out1 who is a clone of $eval(%cnicks)
%join.clone.scan.out2 5(Clone of: $eval(%cnicks) $+ )


has joined #test who is a clone of $eval(%cnicks)

What do I do wrong here?

Joined: Jul 2006
Posts: 4,163
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,163
Use $eval(%cnicks,2)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
I tryed that, do not work

Joined: Jul 2006
Posts: 4,163
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,163
Misread, use it on %join.clone.scan.out1 and %join.clone.scan.out2 in your /echo of course


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Thats just sweet! Thanks alot smile

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
For this sort of thing you would use /echo -a to test. I will mess around with it until I can get it to work.

Joined: Feb 2009
Posts: 133
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2009
Posts: 133
Originally Posted By: Deep3D
has joined #test who is a clone of $eval(%cnicks)
is $eval(%var,2) or $(%var,2)



WorldDMT
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can also use $var(%cnicks,1).value

Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
How to use this:
Code:
set %away.system.auto.message Auto away after $duration(%away.system.auto.check,2) of idle


And get this in var:
Code:
%away.system.auto.message Auto away after $duration(%away.system.auto.check,2) of idle


And not this:
Code:
%away.system.auto.message Auto away after 1hr of idle

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
set %away.system.auto.message Auto away after $!duration(%away.system.auto.check,2) of idle
The ! prevents the identifier from being evaluated in the /set command.

Alternatively, add an $eval(,N) and 0 as the N value:
set %away.system.auto.message Auto away after $eval($duration(%away.system.auto.check,2),0) of idle

Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Thanks smile


Link Copied to Clipboard