mIRC Home    About    Download    Register    News    Help

Print Thread
#173455 25/03/07 03:03 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Php Code:

.:17:00:. <Duck_Power> DP-User1
€ Duck_Power (~Duck_Powe@KnuffelBeertje.Van.Troy) noemde je naam op #duck_power: DP-User1 €
 


That i see when i use:

Code:
ON *:TEXT:*:#:{
  if $1- == $me {
    echo -a 10€12 $nick 11(10 $+ $address $+ 11)12 noemde je naam op $chan $+ :11 $1- 10€
  }
}


:| But it works only when i say : DP-User1
but when i say : llalalalalal DP-User1

it does nothing ¬¬ And $1- is everthing, though?


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #173458 25/03/07 03:12 PM
Joined: Mar 2007
Posts: 38
H
Ameglian cow
Offline
Ameglian cow
H
Joined: Mar 2007
Posts: 38
ON *:TEXT:*:#:{
if ($me isin $strip($1-)) { echo -a 10€12 $nick 11(10 $+ $address $+ 11)12 noemde je naam op $chan $+ :11 $1- 10€ }
}

Cya!.-


"if ($me ison $forum) { say Hello! }"
DuXxXieJ #173944 01/04/07 12:57 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
or you try something like:

Code:
ON *:TEXT:$($+(*,$me,*)):#:{ 
 if ($chan != $active){
  echo -a $nick just sayd $replace($1-,$me,$+($chr(31),$me,$chr(31))) $chr(15) on $chan
 }
}


smile

DuXxXieJ #173945 01/04/07 01:00 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
on *:text:*:#:{
  if ($istok($1-,$me,32)) { echo -a 10€12 $nick 11(10 $+ $address $+ 11)12 noemde je naam op $chan $+ :11 $1- 10€ }
}


The problem with your own script is that you're checking if $1- *equals* $me, not that $1- *contains* $me

hixxy #174250 04/04/07 01:54 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Code:
on *:text:*:#testt:{
  if $1- == $me { 
    msg $chan $read(me.txt) 
  }
}


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #174258 04/04/07 04:17 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
As hixxy said, you don't want to say:

if ($1- == $me) { }

$1- is the entire piece of text. So the only way it will equal your nick is if nothing else is written on that line. It's much better to use:

if ($me isin $1-) { }

or hixxy's suggestion of $istok (though that won't trigger if your nick has any punctuation around it).


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard