mIRC Homepage
Posted By: Garou random nick whois - 23/08/06 06:09 PM
I have 2 set of codes to make this work. One in alias and one in remote. Is it possible to replace both with one in remote?

alias: randomnick {
if ( $me isop #manila ) { set %op.random.channel.nick $rand($nick(#manila,0),1) | whois $nick(#manila,%op.random.channel.nick) }
}
remote: on *:{
if ( %op.random == off ) || ( %op.random == $null ) { return }}
Posted By: xDaeMoN Re: random nick whois - 23/08/06 06:56 PM
You can put this on your remote

Code:
 alias randomnick {
  if ( !%op.random ) && ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}
 


If this is not what you're looking for, please clarify.
Posted By: Garou Re: random nick whois - 23/08/06 07:02 PM
Will this do a whois on the random nick every 60sec ?
Something like this maybe?

alias randomnick {
if ( %op.random == off ) || ( %op.random == $null ) || ($nick isop #) { return }
{ set %op.random On | timerrnick 0 60 randomnick }
if ( !%op.random ) && ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}
Posted By: xDaeMoN Re: random nick whois - 23/08/06 07:24 PM
No, but you will need to use a /timer

Code:
 /timerrandomwhois 0 60 randomnick 
Posted By: Garou Re: random nick whois - 23/08/06 07:28 PM
Yes, can it be added in the same code?
Posted By: FNar Re: random nick whois - 23/08/06 07:42 PM
You can have an alias in your remotes by using the "alias" word, but you can't have either a remote or an alias functioning as both an alias and a remote - they have to be 1 remote and 1 alias. You can't call a remote (it triggers based on an event) and you can't have an event trigger an alias (without a remote calling the alias when it [the remote] triggers).

So "can it all be in one file"? Yes. "Can it all be one function"? No.

(I guess the answer depends on which question you're asking.)
Posted By: Garou Re: random nick whois - 23/08/06 07:47 PM
I see ok Yes all in one file please is just fine for me.
Posted By: xDaeMoN Re: random nick whois - 23/08/06 07:48 PM
Code:
 alias randomnick {
  if  ( !%op.random ) {
    if ( !$timer(randomwhois) ) { .timerrandomwhois 0 60 randomnick  }
    if ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
  }
} 
Posted By: Garou Re: random nick whois - 23/08/06 08:04 PM
I put this in the alias right?

I get this error

* Error: /RANDOMNICK is an unknown command.
Posted By: Garou Re: random nick whois - 23/08/06 08:24 PM
It working now, those this seem ok to you?

alias randomnick {
if ( %op.random == off ) || ( %op.random == $null ) || ($nick isop #) { return }
if ( !$timer(randomwhois) ) { timerrandomwhois 0 60 randomnick }
if ( $me isop #manila ) { whois $nick($v2,$rand(1,$nick($v2,0))) }
}
}
Posted By: xDaeMoN Re: random nick whois - 23/08/06 08:30 PM
You can remove the "|| ($nick isop #)", not needed there.
Posted By: Garou Re: random nick whois - 23/08/06 08:31 PM
Ok cool thx very much.
© mIRC Discussion Forums