mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2017
Posts: 24
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Feb 2017
Posts: 24
hi, how to separate "on text" messages from "on join, on part, quit, notice" actions with "echo $window $chr(160)", if an action comes before the message execute "echo $window $chr (160)", if it is another message, do not execute "echo $window $chr(160)", and vice versa, when it is just action after action, do not execute "echo $window $chr(160)", like this as if it is just message after message, it does not execute "echo $window $chr(160)", only the message and action enters the exchange.

Joined: Jan 2012
Posts: 321
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 321
If I understood the translation of your request correctly, then you can try using this script code:
Code
on ^*:TEXT:*:#: sep $1- | halt
on ^*:NOTICE:*:?: sep $1- | halt
on ^*:JOIN:#: sep $1- | halt
on ^*:PART:#: sep $1- | halt
on ^*:QUIT: sep $1- | halt

alias -l sep {
  if ($event == text) var %sep 1
  if ($event == notice) var %sep 2
  if ($istok(join part quit,$event,32)) var %sep 3
  if ($event == quit) var %sep 4
  ;-------------------------
  if (%sep == 1 && $hget(sep,act) isnum 2-4) { echo $chan $chr(160) | .hadd -m sep act %sep }
  if (%sep == 2 && $hget(sep,act) == 1) { echo $active $chr(160) | .hadd -m sep act %sep }
  if (%sep == 3 && $hget(sep,act) == 1) { echo $chan $chr(160) | .hadd -m sep act %sep }
  ;-------------------------
  if ($event == text) echo -tc $event $chan $nick $1-
  if ($event == notice) echo -tc $event $active - $+ $nick $+ - $1-
  if ($istok(join part,$event,32)) echo -tc $event $chan * $nick ( $+ $address $+ ) $event $chan
  if ($event == quit) {
    var %i $comchan($nick,0) | while (%i) {
      if (%sep == 4 && $hget(sep,act) == 1) { echo $comchan($nick,%i) $chr(160) }
      echo -tc $event $comchan($nick,%i) * $nick ( $+ $address $+ ) Quit $iif($1,$+($chr(40),$1-,$chr(41))) | dec %i
    } | .hadd -m sep act %sep
  }
}

Implementing the "QUIT" event is more difficult, and I don't have much time for extensive testing right now.
Therefore, test this script yourself. I hope that everything will be displayed correctly for you.

Happy New Year.


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

Link Copied to Clipboard