mIRC Home    About    Download    Register    News    Help

Print Thread
#62019 27/11/03 06:24 PM
Joined: Nov 2003
Posts: 4
M
MarkOV Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Nov 2003
Posts: 4
Hi all,

I want to make a script when people say ":W markov" to me, I say :W $nick back. The channel name is #xezium on irc.erik1.nl. Here's my code:

on 1:TEXT::W markov:#xezium:/msg $chan :W $nick

but at those :: at TEXT::W it doesn't seems to work out. How can I solve these double : things ??

Thx

#62020 27/11/03 07:40 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
You cannot use : as part of the matchtext since it's part of the event syntax.

Try
Code:
on *:TEXT:*:#channelname: {
  if (:W markov == $1-) do stuff
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#62021 27/11/03 08:14 PM
Joined: Nov 2003
Posts: 4
M
MarkOV Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Nov 2003
Posts: 4
Yay it works laugh thanks alot !!

#62022 27/11/03 11:32 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
you could also use $() (no not $+() ) with the match text if I'm not mistaken :-]


on *:TEXT:$($chr(58),W markov):#: { }

which would save you having the event at the top of a clean remote file to work...


If it ain't broken, don't fix it!
#62023 29/11/03 01:03 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You do need $+() here. $() doesn't concatenate anything, it's just there to tell mirc to evaluate the matchtext. For example, it's obvious that
//echo -a $chr(58),W markov
won't work, you need $chr(58) $+ W markov or $+($chr(58),W markov). Similarly, the event should be:
Code:
on *:text:$($chr(58) $+ W markov):#:{ }
or
Code:
on *:text:$($+($chr(58),W markov)):#:{ }


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard