mIRC Home    About    Download    Register    News    Help

Print Thread
#266293 06/11/19 09:53 AM
Joined: Nov 2019
Posts: 2
S
skill Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Nov 2019
Posts: 2
Hello,

I was a long time mIRC user and tried hexchat when I tested ubuntu. The only feature which I miss back on windows with mIRC is a other colour for users/bouncers that are flagged away or are idling. Is is possible to integrate this feature into mIRC?

greets

skill

Joined: Feb 2011
Posts: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
Just made this, have not really tested it.

Only works on networks that support "away-notify", you can check by entering "/cap ls" in the status window and looking for "Caps supported: ... away-notify ... ".


Code
; For mIRC 7.48 and newer.
; 15/04/2017 - mIRC v7.48
; ...
; 18.Added CAP support for away-notify...
; https://ircv3.net/specs/extensions/away-notify-3.1

; Not designed for multiple networks because the script only uses nicks.

; NOTE: Currently set to use grey ( ctrl+k 14 ) because xchat/hexchat uses that.
; Any nicks the address book ( /abook -l ) with this colour will be deleted
; when this script is loaded / unloaded or client connects / disconnects.

; If you don't like that colour, you can change it to something else below.
; Anything using the colour you pick will be deleted.

on *:start:{
  .cnick on

  ; Change this for a different colour.
  set %away-nick-colour 14

  away-nick-delete
}

on *:unload:{
  away-nick-delete
  unset %away-nick-colour
}

on *:connect:{
  away-nick-delete
}

on *:disconnect:{
  away-nick-delete
}

; User set or unset /away, change the nick.
raw away:*:{
  if ($1 != $null) {
    .cnick $nick %away-nick-colour
  }
  if ($1 == $null) {
    .cnick -r $nick
  }
}

; /who #channel
raw 352:*: {
  if (G isin $7) {
    .cnick $6 %away-nick-colour
  }
}

on *:join:#:{
  if ($nick == $me) {
    who $chan
  }
}

on *:nick:{
  ; Delete old nick, add new one if they are /away.
  if ($cnick($nick)) {
    .cnick -r $nick
    .cnick $newnick %away-nick-colour
  }
}

on *:quit:{
  .cnick -r $nick
}

on *:part:#:{
  ; Delete the nick if we do not share any channels if they /part one.
  if ($comchan($nick,0) == 0) {
    .cnick -r $nick
  }
}

; Only delete the nicks ( /abook -l ) that are using the colour the script is using.
alias -l away-nick-delete {
  var %x $cnick(0)
  while (%x) {
    if ($cnick(%x).colour == %away-nick-colour) {
      .cnick -r $cnick(%x)
    }
    dec %x
  }
}



Link Copied to Clipboard