mIRC Home    About    Download    Register    News    Help

Print Thread
@Window for Highlights Snippet #233144 16/07/11 05:56 AM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
Okay, so I have been playing around with a couple of snippets to make an @window for when I get highlighted. I have a couple of questions that I hope you guys can help me out with.

Code:
(Got rid of this so it wouldn't stretch the page. I'm not using this anymore.


That works and will display the message in this way: [Timestamp][Channel]<Nick> Message. That's how I want it displayed in the @Highlights window. The only problem is that it will only work for my current nick.

Code:
on *:text:*:#:{
  var %x $me Draelor Nah`utal Nah'utal Drae Nick Sergeant SGT
  var %y $numtok(%x,32)
  while %y {
    if $wildtok($strip($1-),$token($+(*,%x,*),%y,32),1,32) {
      $iif(!$window(@highlights),window -ak0 @Highlights)
      echo @Highlights $timestamp $+ $chan $+ < $+ $nick $+ > $1-
    }
    dec %y
  }
}


That works but it will display the message in this way: [Timestamp]Channel<Nick> Message. I want to know how to get the brackets around the channel name like the first code does.

Also, I cannot figure out how to get this to work for when I am highlighted in an action message (/me message).

Can someone help me out?

Last edited by weedorcollege; 16/07/11 07:30 AM.
Re: @Window for Highlights Snippet [Re: weedorcollege] #233145 16/07/11 07:02 AM
Joined: Feb 2011
Posts: 366
K
KindOne Offline
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 366
It looks like you was missing some coding.

Try this, it should display like this:

[Timestamp][Channel]<Nick> Message

Code:
on *:text:*:#:{
  var %x $me Draelor Nah`utal Nah'utal Drae Nick Sergeant SGT
  var %y $numtok(%x,32)
  while %y {
    if $wildtok($strip($1-),$token($+(*,%x,*),%y,32),1,32) {
      $iif(!$window(@highlights),window -ak0 @Highlights)
      echo @Highlights $timestamp $+ [ $+ $chan $+ ]< $+ $nick $+ > $1-
    }
    dec %y
  }
}

; This is for the /me stuff

on *:action:*:#:{
  var %x $me Draelor Nah`utal Nah'utal Drae Nick Sergeant SGT
  var %y $numtok(%x,32)
  while %y {
    if $wildtok($strip($1-),$token($+(*,%x,*),%y,32),1,32) {
      $iif(!$window(@highlights),window -ak0 @Highlights)
      echo @Highlights $timestamp $+ [ $+ $chan $+ ]< $+ $nick $+ > $1-
    }
    dec %y
  }
}




irc.swiftirc.net #msl (mIRC Scripting Language)
Re: @Window for Highlights Snippet [Re: KindOne] #233146 16/07/11 07:33 AM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
Yeah, I did eventually figure that out, but thank you.

Now I want to know why it won't send the message or action to the @window if there is a full stop after it.

So, if someone does one of these, it won't send it:
<Nick> Highlight.
* Nick pokes Highlight.

Re: @Window for Highlights Snippet [Re: weedorcollege] #233151 16/07/11 05:01 PM
Joined: Nov 2007
Posts: 50
weedorcollege Offline OP
Babel fish
OP Offline
Babel fish
Joined: Nov 2007
Posts: 50
Okay, I figured out how to get it to send highlights with a full stop or something else touching it to the @Highlights window, but now there's another problem.
Code:
on *:TEXT:*:#:{
  var %x *Draelor* *Dr[a]elor* *Nah`utal* *Nah'utal* *Drae* *Nick* *Sergeant* *SGT*
  var %y $numtok(%x,32)
  while %y {
    if $wildtok($strip($1-),$token($+(*,%x,*),%y,32),1,32) {
      $iif(!$window(@highlights),window -ak0 @Highlights)
      echo @Highlights $timestamp $+ [ $+ $chan $+ ]< $+ $nick $+ > $1-
    }
    dec %y
  }
}

on *:ACTION:*:#:{
  var %x *Draelor* *Dr[a]elor* *Nah`utal* *Nah'utal* *Drae* *Nick* *Sergeant* *SGT*
  var %y $numtok(%x,32)
  while %y {
    if $wildtok($strip($1-),$token($+(*,%x,*),%y,32),1,32) {
      $iif(!$window(@highlights),window -ak0 @Highlights)
      echo @Highlights $timestamp $+ [ $+ $chan $+ ]* $+ $nick $1-
    }
    dec %y
  }
}
That's how I have it set up now, with wildcards next to all of the highlights. But now it doubles them up in the @Highlights window, like this:

[12:18][#nah`utal]<Sneux> Draelor.
[12:18][#nah`utal]<Sneux> Draelor.