mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
Hi iam trying to write a script that whispers wheter a actual host or even a nickname i saved in a variables but

/msg $MyVar $nick joins the room

just whispers the nick himself .. it ignores the $MyVar
also

/msg $opnick(#,1) $nick joins the room

doesent work...

any sugestions ?

Joined: Nov 2003
Posts: 25
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2003
Posts: 25
1. Variables start with % instead of $

/msg %MyVar $nick joins the room


2. $opnick only has a value in OP/DEOP events

If you want the first nick with ops on the channel: $nick($chan,1,o)

Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
hey thx that with the % instead of the $ worked fine:D...
but thisone

$nick($chan,1,o)

dident work
thx:)

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Then it must mean that the $chan identifier isn't filled, which means you're not calling it from a channel window.

$chan will be filled when issuing the command on a channel window, or in an event that fills $chan, or an alias that is called from an event where $chan is filled.

Or it could be that there are no ops on the channel where you are issuing that identifier.

Quote:
/msg $opnick(#,1) $nick joins the room

By the way, if you are issuing this command from the editbox, then it will not work. That is because the $opnick(#,1) isn't evaluated. If you want identifiers and variables to evaluate from the command line, you must use double slash //

@NeoN: $opnick() works fine out of an event, it's simply a depreciated identifier, which still works.


Gone.
Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
hey thx again:D...

that was it...
greetz

Joined: Aug 2004
Posts: 43
J
javatis Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Aug 2004
Posts: 43
lol it doesent worked :S... i just had myself whisperd because the $nick

greetz

any other sugestions how to whisper an actual host?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Make a list of nicks/hosts that you want. Put it in a text file or a hash table or wherever.

Then use an IF statement. Depending on where you store the data, the format of the IF statement will change. Basically, you need "if nick/host is in file, msg the op".

The other option is to put the nicks/hosts in the User list Alt-R > Users. Put them all on a certain level (named or numerical). Then, set up your on join for that.

Example:

In the users tab, I put:

whisper:nick1
whisper:nick2
whisper:nick3

In remotes, I put:
Code:
on whisper:join:#chan: {
  msg $opnick(#,1) $nick joins the room
}


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2003
Posts: 25
N
Ameglian cow
Offline
Ameglian cow
N
Joined: Nov 2003
Posts: 25
Quote:
@NeoN: $opnick() works fine out of an event, it's simply a depreciated identifier, which still works.


Mhh, right... must have made a typo when I quickly tested it earlier.


Link Copied to Clipboard