mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2025
Posts: 2
N
Nony Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Aug 2025
Posts: 2
Hello,

After 15 years away from IRC networks, I’m getting back on mIRC, of course. I want to style the different messages.

So far, this is what I’ve managed. I’ve formatted my own messages as well as those from others.

Code
on ^*:TEXT:*:#: {
  haltdef
  echo -t $chan 94 $time(HH:nn:ss) 64 $nick : 15 $1-
}


on *:INPUT:#: {
  if (/* !iswm $1) {
    haltdef
    echo -t $chan 14 $time(HH:nn:ss) 65 $me : 15 $1-
  }
}

Where I’m running into a problem is with nickname colors. For example, the nickname SkullGold appears in red in the user list, but not in the messages. I’d like OPs to appear in red, half-ops in green, voiced users in white, and everyone else in orange.

[Linked Image from i.imgur.com]

Joined: Jan 2012
Posts: 370
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 370
Try using this script code:
Code
on ^*:TEXT:*:#: haltdef | echo $chan $msgtime $msgnick($nick,$chan) :15 $1-
on *:INPUT:#: if (/* !iswm $1) { haltdef | echo $chan $msgtime $msgnick($me,$chan) :15 $1- }

alias -l msgtime { return $+(94,$time(HH:nn:ss)) }
alias -l msgnick {
  if ($1 isop $2) { return $+(04,$1) }
  elseif ($1 ishop $2) { return $+(09,$1) }
  elseif ($1 isvoice $2) { return $+(00,$1) }
  else { return $+(07,$1) }
}


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Aug 2025
Posts: 2
N
Nony Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Aug 2025
Posts: 2
Hello,

I noticed that my previous code wasn’t working properly, my messages weren’t visible to others.

I tried your code Epic, thank you, the colors seem to work, but it’s the same issue: the message isn’t visible in the channel.

[Linked Image from i.imgur.com]

Joined: Jan 2012
Posts: 370
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 370
This is because we forgot to add a line in the handler "ON INPUT" with the command ".msg" to send (in invisible mode) your own messages to the channel, since they are blocked by the command "haltdef", and are only displayed in the echo, which is visible only to you.

Try using this script code with changes and fixes:
Code
on ^*:TEXT:*:#: haltdef | msgtext $chan $nick $1-
on *:INPUT:#: if (/* !iswm $1) { haltdef | .msg $chan $1- | msgtext $chan $me $1- }

alias -l msgtext { echo $1 $msgtime $msgnick($2,$1) :15 $3- }
alias -l msgtime { return $+(94,$time(HH:nn:ss)) }
alias -l msgnick {
  if ($1 isop $2) { return $+(04,$1) }
  elseif ($1 ishop $2) { return $+(09,$1) }
  elseif ($1 isvoice $2) { return $+(00,$1) }
  else { return $+(07,$1) }
}


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Jan 2012
Posts: 370
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 370
You can also try using another variation of the script code with one common alias to check the nick, format and send the echo message:
Code
on ^*:TEXT:*:#: haltdef | emsg $chan $nick $1-
on *:INPUT:#: if (/* !iswm $1) { haltdef | .msg $chan $1- | emsg $chan $me $1- }

alias -l emsg {
  var %time $+(94,$time(HH:nn:ss))
  if ($2 isop $1) { var %nick $+(04,$2) }
  elseif ($2 ishop $1) { var %nick $+(09,$2) }
  elseif ($2 isvoice $1) { var %nick $+(00,$2) }
  else { var %nick $+(07,$2) }
  echo $1 %time %nick :15 $3-
}


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples

Link Copied to Clipboard