mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2013
Posts: 6
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Mar 2013
Posts: 6
Edit: Found someone on IRC that helped.

Working code:
Code:
on *:text:*:#pre: {
  if ($nick == PRE) && ($1- == $remove($1-,FOREiGN,NUKED,MViD,XXX)) && ($1- != $remove($1-,X264,GAMES,BLURAY)) {
    noop $tip(BTNPRE,PRE:,$1-,300)
  }
}


Original post from here down:
Doesn't work:
Code:
on *:text:*:#pre: {
  if ($nick === PRE) && (X264|GAMES|BLURAY isin $1-) && (FOREiGN|NUKED|MViD !isin $1-) {
    noop $tip(BTNPRE,PRE:,$1-,300)
  }
}


Does work:
Code:
on *:text:*:#pre: {
  if ($nick === PRE) && (X264 isin $1-) && (FOREiGN !isin $1-) {
    noop $tip(BTNPRE,PRE:,$1-,300)
  }
}


I am trying to alter this simple popup to better suit my needs. All i need it to figure out how to make multiple words work with isin !insn statements?(not sure of the definition).

Last edited by LoneThistle; 12/11/13 03:42 AM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Another way is $count(), see /help $count

Code:
on *:text:*:#pre: {
  if ($nick == PRE) && ($count($1-,FOREiGN,NUKED,MViD,XXX)) && (!$count($1-,X264,GAMES,BLURAY)) {
    noop $tip(BTNPRE,PRE:,$1-,300)
  }
}

Also, you could use regex in the on text event so it only triggers if the 1st condition is met.
Code:
on $*:text:/(X264|GAMES|BLURAY)/Si:#pre:{
  if ($nick == PRE) && (!$count($1-,FOREiGN,NUKED,MViD,XXX)) {
    noop $tip(BTNPRE,PRE:,$1-,300)
  }
}


Link Copied to Clipboard