Welcome Guest | RSS
MPC-HC media announcer snippet. - mIRC Land
Home | MPC-HC media announcer snippet. - mIRC Land | Sign Up | Log In
To skip the ad click continue and skip
 
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Forum moderator: Wikked 
mIRC Land » mIRC Scripts » mIRC User (User-Wise) Scripts » MPC-HC media announcer snippet. (MPC-HC media announcer snippet.)
MPC-HC media announcer snippet.
WikkedDate: Saturday, 31/12/2016, 6:25:55 PM | Message # 1
I Own This
Group: Moderators
Messages: 4
Reputation: 0
Status: Offline
In order to use it you need to have MPC-HC running and make sure the web interface in options is enabled.
Code
;In order to use it you need to have MPC-HC running and make sure the web interface in options is enabled.

menu channel,query {
  MPC-HC { mpc }
}

alias mpc {
  if ($sock(mpchc.np)) {
    sockclose $v1
}

  var %mpchc.host localhost
  var %mpchc.port 13579

  sockopen mpcnp 127.0.0.1 13579
  sockmark mpcnp $active
}

on *:SOCKOPEN:mpcnp:{
  if ($sockerr) {
    echo -a [MPC NP] Unable to connect: $sock($sockname).wsmsg
  }
  else {
    ;echo -a [MPC NP] Requesting /info.html
    sockwrite -n $sockname GET /info.html HTTP/1.1
    sockwrite -n $sockname Host: localhost:13579
    sockwrite -n $sockname Connection: close
    sockwrite -n $sockname
  }
}

on *:SOCKREAD:mpcnp:{
  if ($sockerr) {
    echo -a [MPC NP] Sock read error
  }
  else {
    var %s
    sockread %s
    if (<p id="mpchc_np"> isin %s) {
      msg $active $nohtml(%s)
      sockclose $sockname
    }
  }
}

alias -l nohtml {
  var %out = $regsubex($1-, /(?:<[^>]*(?:>|$))|(?:^[^>]*>)/g, )
  %out = $replacecs(%out, «,«, »,», •,•)
  return %out
}
 
mIRC Land » mIRC Scripts » mIRC User (User-Wise) Scripts » MPC-HC media announcer snippet. (MPC-HC media announcer snippet.)
Page 1 of 11
Search:

Copyright MyCorp © 2017