begin process at 2013 06 20 09:20:24
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Scripts

 > MODIFICATION ET TRADUCTION DU SCRIPT RHYTHMBOX XCHAT ANNOUNCER

MODIFICATION ET TRADUCTION DU SCRIPT RHYTHMBOX XCHAT ANNOUNCER


 Information sur la source

Note :
Aucune note
Catégorie :Scripts Classé sous :Xchat, Rhythmbox, perl Niveau :Débutant Date de création :26/12/2010 Date de mise à jour :26/12/2010 23:56:29 Vu / téléchargé :4 901 / 35

Auteur : TrHiLK1L

Ecrire un message privé
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description

Voila
Je me suis amusé à traduire le script perl pour Xchat
J'ai ajouté aussi quelques fonctions comme l'annonce sur plusieurs chans  et un timer de 30 minute qui annonce sur tout les chans

Par contre je sais qu'il faudrait le moyen de choisir le temps pour le timer mais je n'ai pas trouvé comment demandé une valeur à l'utilisateur pour spécifier l'argument en perl
Ainsi que de ne pas lancer le timer plusieurs fois et une fonction arrêt
Bref je ne connais pas le perl et j'ai fait au mieux donc modifier  et envoyé moi des modifs sa serrais sympa
:)

Source

  • #!/usr/bin/perl -w
  • # Rhythmbox XChat Announcer 0.3.1
  • # (c) Copyright 2006, 2007 - Tim Denholm <tim@codestorm.net>
  • #
  • # This program is free software; you can redistribute it and/or modify
  • # it under the terms of the GNU General Public License as published by
  • # the Free Software Foundation; either version 2 of the License, or
  • # (at your option) any later version.
  • #
  • # This program is distributed in the hope that it will be useful,
  • # but WITHOUT ANY WARRANTY; without even the implied warranty of
  • # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  • # GNU General Public License for more details.
  • #
  • # You should have received a copy of the GNU General Public License
  • # along with this program; if not, write to the Free Software
  • # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  • ############################################################################
  • # Traduction et modification TrHiL-KiL #
  • # gsmtrhilkil@gmail.com #
  • ############################################################################
  • use POSIX qw(strftime);
  • $script_name = "Annonceur Rhythmbox XChat";
  • $script_version = "0.3.2";
  • $script_description = "Annonce les informations en cours de lecture chanson de Rhythmbox dans XChat.";
  • $rhythmbox_traductionmodif = "Traduction et modification par TrHiLKiL";
  • $rhythmbox_version = `Rhythmbox --version`;
  • $rhythmbox_version =~ s/GNOME\srhythmbox\s//;
  • chop $rhythmbox_version;
  • Xchat::register($script_name,$script_version,$script_description,$rhythmbox_traduction,"");
  • Xchat::print("Loaded \002".$script_name."\002:");
  • Xchat::print("Utilisez \002 /rb_aide \002 pour afficher une liste de commandes.");
  • Xchat::hook_command("arb", "arb");
  • Xchat::hook_command("rb", "rb_announce");
  • Xchat::hook_command("rb_annonce", "rb_announce");
  • Xchat::hook_command("rbtous", "rb_announceall");
  • Xchat::hook_command("rb_annoncetous", "rb_announceall");
  • Xchat::hook_command("rb_repetition", "rb_announcerep");
  • Xchat::hook_command("rb_rep", "rb_announcerep");
  • Xchat::hook_command("rb_suivant", "rb_next");
  • Xchat::hook_command("rb_precedent", "rb_prev");
  • Xchat::hook_command("rb_play", "rb_play");
  • Xchat::hook_command("rb_pause", "rb_pause");
  • Xchat::hook_command("rb_version", "rb_version");
  • Xchat::hook_command("rb_aide", "rb_help");
  • sub arb
  • {
  • # Check if a rhythmbox process exists.
  • if (`ps -C rhythmbox` =~ /rhythmbox/) {
  • # Get current playing song information.
  • $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
  • chop $song_info;
  • Xchat::command("ame est à l'écoute:: ".$song_info);
  • } else {
  • Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
  • }
  • return 1;
  • }
  • sub rb_announce
  • {
  • # Check if a rhythmbox process exists.
  • if (`ps -C rhythmbox` =~ /rhythmbox/) {
  • # Get current playing song information.
  • $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
  • chop $song_info;
  • Xchat::command("me est à l'écoute: ".$song_info);
  • } else {
  • Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
  • }
  • return 1;
  • }
  • sub rb_announcerepall
  • {
  • # Check if a rhythmbox process exists.
  • if (`ps -C rhythmbox` =~ /rhythmbox/) {
  • # Get current playing song information.
  • $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
  • chop $song_info;
  • Xchat::command("timer -repeat 0 1800 ame est à l'écoute: ".$song_info);
  • } else {
  • Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
  • }
  • return 1;
  • }
  • sub rb_announceall
  • {
  • # Check if a rhythmbox process exists.
  • if (`ps -C rhythmbox` =~ /rhythmbox/) {
  • # Get current playing song information.
  • $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
  • chop $song_info;
  • Xchat::command("ame est à l'écoute: ".$song_info);
  • } else {
  • Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
  • }
  • return 1;
  • }
  • sub rb_next
  • {
  • # Skip to the next track.
  • eval `rhythmbox-client --next`;
  • Xchat::print("S'est arrêté à la piste suivante.");
  • return 1;
  • }
  • sub rb_prev
  • {
  • # Skip to the previous track.
  • eval `rhythmbox-client --previous`;
  • Xchat::print("S'est arrêté à la piste précédente..");
  • return 1;
  • }
  • sub rb_play
  • {
  • # Start playback.
  • eval `rhythmbox-client --play`;
  • Xchat::print("Commencé la lecture.");
  • return 1;
  • }
  • sub rb_pause
  • {
  • # Pause playback.
  • eval `rhythmbox-client --pause`;
  • Xchat::print("La lecture en pause.");
  • return 1;
  • }
  • sub rb_version
  • {
  • # Display version information to a channel.
  • Xchat::command("me utilise ".$script_name." ".$script_version." avec Rhythmbox ".$rhythmbox_traductionmodif." ".$rhythmbox_version." et XChat ".Xchat::get_info("version"));
  • return 1;
  • }
  • sub rb_help
  • {
  • # Display help screen.
  • Xchat::print("\002\037".$script_name." Help:\037\002");
  • Xchat::print(" \002About:\002");
  • Xchat::print(" * Author: Tim Denholm <tim\@codestrorm.net>");
  • Xchat::print(" * URL: http://www.ircfr.com/codes/MODIFICATION-TRADUCTION-SCRIPT-RHYTHMBOX-XCHAT-ANNOUNCER_52648.aspx");
  • Xchat::print(" * Script Version: ".$script_version);
  • Xchat::print(" * traduction et modification: ".$rhythmbox_traductionmodif);
  • Xchat::print(" * Rhythmbox Version: ".$rhythmbox_version);
  • Xchat::print(" * XChat Version: ".Xchat::get_info("version"));
  • Xchat::print(" \002Commands:\002");
  • Xchat::print(" * /rb - idem que /rb_announce.");
  • Xchat::print(" * /rbtous - idem que /rb_annoncetous.");
  • Xchat::print(" * /rb_annonce - Afficher la chanson en cours de lecture à un canal.");
  • Xchat::print(" * /rb_annoncetous - Afficher la chanson en cours de lecture à tout les canaux.");
  • Xchat::print(" * /rb_rep - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
  • Xchat::print(" * /rb_repetition - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
  • Xchat::print(" * /rb_suivant - Passer à la piste suivante.");
  • Xchat::print(" * /rb_precedent - Passer à la piste précédente.");
  • Xchat::print(" * /rb_play - Lancez la lecture.");
  • Xchat::print(" * /rb_pause - Pause de la lecture.");
  • Xchat::print(" * /rb_version - Affiche la version du script, Rhythmbox et XChat à un canal.");
  • Xchat::print(" * /rb_aide - Afficher cet écran d'aide.");
  • return 1;
  • }
#!/usr/bin/perl -w

# Rhythmbox XChat Announcer 0.3.1
# (c) Copyright 2006, 2007 - Tim Denholm <tim@codestorm.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
############################################################################
# Traduction et modification TrHiL-KiL                                     #
# gsmtrhilkil@gmail.com                                                    #
############################################################################

use POSIX qw(strftime);

$script_name        = "Annonceur Rhythmbox XChat";
$script_version     = "0.3.2";
$script_description = "Annonce les informations en cours de lecture chanson de Rhythmbox dans XChat.";
$rhythmbox_traductionmodif = "Traduction et modification par TrHiLKiL";
$rhythmbox_version = `Rhythmbox --version`;
$rhythmbox_version =~ s/GNOME\srhythmbox\s//;
chop $rhythmbox_version;

Xchat::register($script_name,$script_version,$script_description,$rhythmbox_traduction,"");

Xchat::print("Loaded \002".$script_name."\002:");
Xchat::print("Utilisez \002 /rb_aide \002 pour afficher une liste de commandes.");

Xchat::hook_command("arb",		"arb");
Xchat::hook_command("rb",		"rb_announce");
Xchat::hook_command("rb_annonce",	"rb_announce");
Xchat::hook_command("rbtous",	        "rb_announceall");
Xchat::hook_command("rb_annoncetous",	"rb_announceall");
Xchat::hook_command("rb_repetition",   "rb_announcerep");
Xchat::hook_command("rb_rep",	         "rb_announcerep");
Xchat::hook_command("rb_suivant",	"rb_next");
Xchat::hook_command("rb_precedent",	"rb_prev");
Xchat::hook_command("rb_play",		"rb_play");
Xchat::hook_command("rb_pause",		"rb_pause");
Xchat::hook_command("rb_version",	"rb_version");
Xchat::hook_command("rb_aide",		"rb_help");

sub arb
{
	# Check if a rhythmbox process exists.	
	if (`ps -C rhythmbox` =~ /rhythmbox/) {
		# Get current playing song information.
		$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
		chop $song_info;

		Xchat::command("ame est à l'écoute:: ".$song_info);
	} else {
		Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
	}

	return 1;
}

sub rb_announce
{
	# Check if a rhythmbox process exists.	
	if (`ps -C rhythmbox` =~ /rhythmbox/) {
		# Get current playing song information.
		$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
		chop $song_info;

		Xchat::command("me est à l'écoute: ".$song_info);
	} else {
		Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
	}

	return 1;
}
sub rb_announcerepall
{
	# Check if a rhythmbox process exists.	
	if (`ps -C rhythmbox` =~ /rhythmbox/) {
		# Get current playing song information.
		$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
		chop $song_info;

		Xchat::command("timer -repeat 0 1800  ame est à l'écoute: ".$song_info);
	} else {
		Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
	}

	return 1;
}
sub rb_announceall
{
	# Check if a rhythmbox process exists.	
	if (`ps -C rhythmbox` =~ /rhythmbox/) {
		# Get current playing song information.
		$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
		chop $song_info;

		Xchat::command("ame est à l'écoute: ".$song_info);
	} else {
		Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
	}

	return 1;
}

sub rb_next
{
	# Skip to the next track.
	eval `rhythmbox-client --next`;
	Xchat::print("S'est arrêté à la piste suivante.");
	return 1;
}

sub rb_prev
{
	# Skip to the previous track.
	eval `rhythmbox-client --previous`;
	Xchat::print("S'est arrêté à la piste précédente..");
	return 1;
}

sub rb_play
{
	# Start playback.
	eval `rhythmbox-client --play`;
	Xchat::print("Commencé la lecture.");
	return 1;
}

sub rb_pause
{
	# Pause playback.
	eval `rhythmbox-client --pause`;
	Xchat::print("La lecture en pause.");
	return 1;
}

sub rb_version
{
	# Display version information to a channel.
	Xchat::command("me utilise ".$script_name." ".$script_version." avec Rhythmbox ".$rhythmbox_traductionmodif." ".$rhythmbox_version." et XChat ".Xchat::get_info("version"));
	return 1;
}

sub rb_help
{
	# Display help screen.
	Xchat::print("\002\037".$script_name." Help:\037\002");
	Xchat::print(" \002About:\002");
	Xchat::print("  * Author: Tim Denholm <tim\@codestrorm.net>");
	Xchat::print("  * URL:    http://www.ircfr.com/codes/MODIFICATION-TRADUCTION-SCRIPT-RHYTHMBOX-XCHAT-ANNOUNCER_52648.aspx");
        Xchat::print("  * Script Version:    ".$script_version);
        Xchat::print("  * traduction et modification:    ".$rhythmbox_traductionmodif);
	Xchat::print("  * Rhythmbox Version: ".$rhythmbox_version);
	Xchat::print("  * XChat Version:     ".Xchat::get_info("version"));
	Xchat::print(" \002Commands:\002");
	Xchat::print("  * /rb          - idem que /rb_announce.");
        Xchat::print("  * /rbtous      - idem que /rb_annoncetous.");
	Xchat::print("  * /rb_annonce - Afficher la chanson en cours de lecture à un canal.");
        Xchat::print("  * /rb_annoncetous - Afficher la chanson en cours de lecture à tout les canaux.");
        Xchat::print("  * /rb_rep - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
        Xchat::print("  * /rb_repetition - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
        Xchat::print("  * /rb_suivant     - Passer à la piste suivante.");
	Xchat::print("  * /rb_precedent     - Passer à la piste précédente.");
	Xchat::print("  * /rb_play     - Lancez la lecture.");
	Xchat::print("  * /rb_pause    - Pause de la lecture.");
	Xchat::print("  * /rb_version  - Affiche la version du script, Rhythmbox et XChat à un canal.");
	Xchat::print("  * /rb_aide     - Afficher cet écran d'aide.");
	return 1;
}


 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
  • xchat_rhythmbox (traductionfr).plTélécharger ce fichier [Réservé aux membres club]6 498 octets

Télécharger le zip


 Historique

26 décembre 2010 23:03:30 :
Je me suis répété dans une commande :P je viens de le remarquer
26 décembre 2010 23:54:00 :
Dans le nom et dans une commande mal traduite
26 décembre 2010 23:56:29 :
...

 Sources de la même categorie

Source avec Zip PHRASE AUTOMATIQUE TXT par Aesculus
Source avec Zip PENDU POUR MIRC par neobidou
[TCL] AUTOJOIN DE ROBOT AUTOMATIQUE par Atok
Source avec une capture TORRENT VIEWER par kamikaze97441
Source avec Zip Source avec une capture PANNEAU DE CONFIGURATION PS7 par aliassangelius

 Sources en rapport avec celle ci

Source avec une capture [XCHAT] ANTI KICK / AWAY C++ par GeroXXXX
[XCHAT] [PERL] ANTI-KICK + AWAY par GeroXXXX
[XCHAT] COMMANDES CHR/ASC par 0x586e
Source avec une capture TRIGGER PERL XCHAT par epitaph
XCHAT - SCRIPT PERL AWAY par lumesh

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

recuperer l'host en perl (xchat) [ par aeled ] J'essaie de faire une commande en perl qui récupere l'host d'un user placé en parametre.en gros /host [nick] doit renvoyer un truc du style : *!*@xxx. events pour xchat en perl [ par Jamu ] Salut a tous Je me suis mis au perl il y a peu de temps et ce que je voudrais fair c virer les evenements textuel d'origine de mon xchat pour me coder add_handler - Script Perl pour Xchat [ par advi ] Bonjour à tous,j'ai créé un script Perl pour Xchat. Il fonctionne parfaitement, j'ai juste un probleme.Je suis capable de déclencher mon script sur de Aide pour petit script pour IRC (débutant + python) [ par SteFoy ] Bonjour!  J'explique la situation en premier lieu. Il y a un jeu qui s'appelle "!bombe". C'est une bombe qui s'allume en tappant "!allume" et on peut Perl [ par uaip ] Bonjour, depuis peu je me suis lancé dans le Perl, mais je ne trouve pas la rubrique qui lui est attribuée ici, est-ce normal ? y-en a t-il une ?merci Xchat et clé wanadoo [ par LiLitheuh ] Bonsoir,J'utilise depuis longtemps l'add-on de Vestax (ca doit s'écrire comme ca...) "wanakey", qui génere la clé orange tout seul comme un grand sans Xchat [ par elwi ] bonjour,voila je decouvre le monde de linux depuis une semainej'ai donc réussi a installer xchat, j'ai trouvé comment mettre des alias, remotes etc .. pb de if() pour bot Perl [ par uaip ] Bonjour à tous, ma question est très simple : quelqu'un sait-il comment coder en Perl l'hypothèse de la présence d'un user sur un salon IRC ? C'est en eeexubuntu, xchat 1 et couleurs permanentes [ par Orkydee51 ] bonjour suis sur eee xubuntu...on se moque pas de mon ignorance...=), j'aurais aimé savoir si quel'qun puvait me donner le tuto integral pour pouvoir [Xchat] Créé un compteur de ligne par pseudo [ par Mattis ] Bonjour, j'aimerais un script pour Xchat qui permet de compter le nombre de lignes qu'un pseudo a dit.Du genre je tappe !cpt_mattiset ça me donne le n


Nos sponsors


Sondage...

CalendriCode

Juin 2013
LMMJVSD
     12
3456789
10111213141516
17181920212223
24252627282930

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,593 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales