mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
I changed default On Text becouse I wanted to have @, +, or _ infront of the nickname if they are ops, voiced or normal users. I used this code:

on ^*:text:*:#:{
if ($nick isop $chan) { set %tekst [@][ $nick ] $1- }
elseif ($nick isvoice $chan) { set %tekst [+][ $nick ] $1- }
else { set %tekst [_][ $nick ] $1- }
echo $chan %tekst
unset %tekst | halt
}

Noooooow, it works just fine, except,
1. that before I changed defaults, when I click on the nickname, who said something in the channel, with the right mouse button a menu opens and I could select Whois (I noticed this in mIRC 6.12. not sure for earlier), but now I can't do that, it only opens channel popup. I was woundering if there is a way to script what was mIRC doing by default.
2. Earlier when a channel is not active, and somebody says something in that channel it becomes red, and now it doesn't change its color, well actually it does, but in some gray color just like when you use echo in some windows (I did use echo in my code, so I am not suprised by that behaviour). Is there a way for my channel to become red line before cool
thanx!


velicha dusha moja Gospoda
Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
if you want it to show like @nick or +nick why not just choose the show mode prefix option in
Options then IRC then check the box that says show mode prefix ?

Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
I knoooow frown, buuuut frown this way I can set diferent colors on [@] and [ $nick ] and can add some nice visual details... I'll see if the price for this is too big... mad


velicha dusha moja Gospoda
Joined: Apr 2003
Posts: 426
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
This is a better solutin (I can't lay claim to it all, most of it was kindly provided by the people on these forums).

Code:
on ^*:TEXT:*:#:{
;First, we check to make sure the "Show status" option is enabled within mIRC.
;If it is, use this:
  if ($gettok($readini($mircini,options,n2),30,44) == 1) {
      echo -bfrtmli $+ $len($timestamp) $chan ( $+ $iif($left($nick(#,$nick).pnick,- $+ $len($nick)),$+(,$color(text).dd,$ifmatch,)) $+  $+ $colour(notice) $+ $nick $+  $+ ) $1-
  }
;If it is disabled, use this:
  if ($gettok($readini($mircini,options,n2),30,44) != 1) {
      echo -bfrtmli $+ $len($timestamp) $chan $+(,$chr(40),,$nick,,$chr(41),) $1-
  }
haltdef
}


--------
mIRC - fun for all the family (except grandma and grandpa)
Joined: Dec 2003
Posts: 261
M
milosh Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Thanx man, I learned a couple of things from your code. First and the most important is... always read help on "/echo" before you start crying :tongue: That will solve my problem about "red color of my channel windows" (-m echo option). But still I cann't get that menu when I do right mouse click on nick in channel window. Thanx again.


velicha dusha moja Gospoda
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
I think that has something to do with the fact there are too much characters bound in front and back of the nickname... enclose the nickname in spaces to solve the problem


If it ain't broken, don't fix it!

Link Copied to Clipboard