PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : BitchX Script: Noatun - What's Playing!



Knusper
28.02.05, 16:58
Ich weis nich obs hier überhaupt hingehört: Aber wer seinen Songtitel unter BitchX von Noatun anzeigen möchte kommt an diesem kleinen Skript von mir nicht vorbei:
:ugly:


# author Christian Herenz
# version 0.1.1
# date 28.02.2005
# some corrections by fudd from cyberpunkz.org ... thanx

# $pipe(command) - to write exec output into a variable
# by hop'97

alias pipe {
@ pipe.intval++
^local mypipeval $pipe.intval
^local mypipedesc pipe$mypipeval
^local mypiperetval

^on ^exec "$mypipedesc *" {
bless
push mypiperetval $1-
}

^exec -name $mypipedesc $*
^wait %$mypipedesc
^on exec -"$mypipedesc *"
return $mypiperetval
}

# fill array with actions

@ setitem(action 0 gibt sich gerade)
@ setitem(action 1 knallt sich zu mit)
@ setitem(action 2 schunkelt zu kewlen Grooves von)
@ setitem(action 3 rocks da house, playin)
@ setitem(action 4 geht volle kanne ab zu)
@ setitem(action 5 torturing his ears with)
@ setitem(action 6 killing his neighborhood (and his speakers) with)
@ setitem(action 7 plays)

alias noatun {

#the dcop calls for noatun
@artist = [$pipe(dcop noatun Noatun 'currentProperty(QString key)' author)]
@title = [$pipe(dcop noatun Noatun 'currentProperty(QString key)' title)]
@comment = [$pipe(dcop noatun Noatun 'currentProperty(QString key)' comment)]
@length = [$pipe(dcop noatun Noatun lengthString)]
# unused: @genre = $pipe(dcop noatun Noatun 'currentProperty(QString key)' genre)


#the function
@ srand($time())
@ random = rand($numitems(action))
me $getitem(action $random) .:${artist}:. ${title} [${length}]
}


Einfach Datei ~/noatun.bx mit obigem code füttern und in .bitchxrc "/load ~/noatun.bx" umrühren ferddich....

comments ausrücklich erwünscht

schnabeltasse
05.03.05, 04:31
/me is listening to SPAM - ****ingspamspamspam.mp3

oh mann ich hasse diese irc-dekadenz :ugly:

Ede
16.11.05, 11:09
Knusper:
Einfach Datei ~/noatun.bx mit obigem code füttern und in .bitchxrc "/load ~/noatun.bx" umrühren ferddich....
Funktioniert es auch, wenn ich /load ~/noatun.bx in ~/.ircrc reinschreibe, wo ich meine ganzen bitchx einstellungen habe?

Knusper
22.12.05, 21:01
jo! klar :)