mIRC Home    About    Download    Register    News    Help

Print Thread
#260499 03/05/17 07:54 AM
Joined: Jul 2016
Posts: 5
M
Mape Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2016
Posts: 5
Hallo

Sorry, but my englisch is not very god smirk

I have e Problem: when i write a Text with a nick, can make only the nick in a other color? This Event work on /say and on /me?

Thanks for your Help

Mape #260504 03/05/17 03:30 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
I'm not sure what you want. Are you talking about the Highlights tab of Address Book, where you can define text words or $identifiers or %variables to highlight?

Or are you wanting to have something that colors your own using /say and /me.

Code:
alias say { var %text $1- | var %i $numtok(%text,32) | while (%i) { var %x $gettok(%text,%i,32) | if ($nick($$chan,%x) isnum 1-) set %text $puttok(%text,$chr(22) %x $chr(22),%i,32) | dec %i } | msg $chan %text }
alias me  { var %text $1- | var %i $numtok(%text,32) | while (%i) { var %x $gettok(%text,%i,32) | if ($nick($$chan,%x) isnum 1-) set %text $puttok(%text,$chr(22) %x $chr(22),%i,32) | dec %i } | describe $chan %text }



This was just quick, and doesn't highlight when the nick is touching commas or periods or anything else besides spaces.

maroon #260515 04/05/17 08:18 AM
Joined: Jul 2016
Posts: 5
M
Mape Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2016
Posts: 5
Hi

It dosen't go.I have this on input event:
Code:
on *:INPUT:*:{
  if ($1 == bs) { say $bunt($2-) }
  elseif ($1 == rs) { say $reverse($2-) }
  elseif ($1 == brs) { say $bunt($reverse($2-)) }
  elseif ($1 == a) { say 05 $2  $3- }
  elseif ($1 == n) { notice $2 10 $3- }
  elseif ($1 == m) { me 10 $2- }
  elseif ($1 == w) { whois $2 }
  elseif ($1 == q) { query $2- }
  haltdef
}

Mape #260517 04/05/17 09:48 AM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
in your script, you need to change the "me" into "describe $active

me $2-
becomes
describe $active $2-

similar goes for "say", becomes "msg $active"

say $2-
becomes
msg $active $2-

Using $active instead of $chan allows this to work in a query window instead of just a channel. If you want this script to reply only in a channel, change the ":*:" into ":#*:"

Also, this script is only allowing input of your special keywords. Any other value for $1 is getting blocked. If you want to allow it to display text normally if it's not one of your keywords, insert this line right above the haltdef:

else return


Link Copied to Clipboard