on $*:text:/!(play|stop|pause|resume|random)/Si:*:{
if ($nick == YourNick) {
if ($isfile(mp3.txt)) {
var %target = $iif($target ischan,$chan,$nick)
if ($1 == !random) { splay $read(mp3.txt) | msg %target I'm now randomly playing $nopath($insong.fname) }
if ($1 == !play) { splay $read(mp3.txt,$2) | msg %target I'm now playing $nopath($read(mp3.txt,$2)) }
if ($1 == !stop) {
if ($insong) { splay stop | msg %target Song stopped }
else { msg %target Song not started }
}
if ($1 == !pause) {
if ($insong) && (!$insong.pause) { splay pause | msg %target Song stopped. }
}
if ($1 == !resume) {
if ($insong) && ($insong.pause) { splay resume | msg %target Song resumed. }
}
}
}
}