mIRC Homepage
Posted By: ElMagico Little help with "what's playing" script - 28/07/15 07:10 PM
Hi everyone.

The script I'm using for mIRC is a "what's playing" script that works with MPC-HC through their option of Web Interface. Basically it reads the information of the video you are playing, now the script works fine and everything.

But my issue is that when ever I use it, it announces it as a normal sentence like /say, is there a way to use it like /me

Example how it looks now:



This is the script I have in mIRC, just how I downloaded it from the GitHub
Code:
;/**
;* mpc.hc.np.mrc, snippet to display now-playing info for MPC-HC
;* Released under the terms of MIT license
;*
;* https://github.com/mpc-hc/snippets
;*
;* Copyright (C) 2012-2013 MPC-HC Team
;*/

;In order to use it you need to enable web interface in options first
;Type /np to show info in active channel

alias nohtml {
  var %nohtml = $regsubex($regsubex($1,/<.+?>/g,),/&#(\d+);/g,$fixentities(\t))
  %nohtml = $replacecs(%nohtml,&laquo;,«,&raquo;,»,&bull;,•)
  return %nohtml
}

alias np {
  var %mpchc.host 127.0.0.1
  var %mpchc.port 13579
  .sockclose mpchc.np
  .sockopen mpchc.np %mpchc.host %mpchc.port
  .sockmark mpchc.np $active
}

on *:sockopen:mpchc.np:{
  sockwrite $sockname GET /info.html HTTP/1.1 $+ $crlf Host: $sock($sockname).ip $crlf $+ $crlf
}

on *:sockread:mpchc.np:{
  var %temptext
  sockread %temptext
  if (*<p id="mpchc_np">* iswm %temptext) {
    %temptext = $regsubex(%temptext, /^\s+/, $null)
    msg $sock($sockname).mark $nohtml(%temptext)
  }
}
Posted By: Plornt Re: Little help with "what's playing" script - 28/07/15 08:28 PM
/me is specific to the channel you are on (as you may have tried).

To send an "action" to a specific channel/nick you can use the /describe command like so:

Code:
/describe <channel|nickname> <message>


Just to note, if you find any issues like this in the future the "/help <command>" is actually pretty helpful and usually directs you to the right command to use.
© mIRC Discussion Forums