[Phpfreechat-svn] SF.net SVN: phpfreechat: [746] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-09-10 17:27:33
|
Revision: 746 http://svn.sourceforge.net/phpfreechat/?rev=746&view=rev Author: kerphi Date: 2006-09-10 10:27:25 -0700 (Sun, 10 Sep 2006) Log Message: ----------- [en] Add a new /version command used to get the current phpfreechat version. [fr] Ajoute une nouvelle commande /version permettant d'afficher le num?\195?\169ro de version de la version courante de phpfreechat Modified Paths: -------------- trunk/src/client/chat.js.tpl.php trunk/src/client/pfcclient.js Added Paths: ----------- trunk/src/commands/version.class.php Modified: trunk/src/client/chat.js.tpl.php =================================================================== --- trunk/src/client/chat.js.tpl.php 2006-09-10 16:11:02 UTC (rev 745) +++ trunk/src/client/chat.js.tpl.php 2006-09-10 17:27:25 UTC (rev 746) @@ -79,7 +79,8 @@ "Enter the text to format", // _pfc "Configuration has been rehashed", // _pfc "A problem occurs during rehash", // _pfc - "Choosen nickname is allready used", //_pfc + "Choosen nickname is allready used", // _pfc + "phpfreechat current version is %s", // _pfc ); foreach($labels_to_load as $l) { Modified: trunk/src/client/pfcclient.js =================================================================== --- trunk/src/client/pfcclient.js 2006-09-10 16:11:02 UTC (rev 745) +++ trunk/src/client/pfcclient.js 2006-09-10 17:27:25 UTC (rev 746) @@ -317,6 +317,13 @@ { } } + else if (cmd == "version") + { + if (resp == "ok") + { + this.displayMsg( cmd, this.res.getLabel('phpfreechat current version is %s',param) ); + } + } else if (cmd == "rehash") { if (resp == "ok") Added: trunk/src/commands/version.class.php =================================================================== --- trunk/src/commands/version.class.php (rev 0) +++ trunk/src/commands/version.class.php 2006-09-10 17:27:25 UTC (rev 746) @@ -0,0 +1,24 @@ +<?php + +require_once(dirname(__FILE__)."/../pfccommand.class.php"); + +class pfcCommand_version extends pfcCommand +{ + var $usage = "/version"; + + function run(&$xml_reponse, $p) + { + $clientid = $p["clientid"]; + $param = $p["param"]; + $sender = $p["sender"]; + $recipient = $p["recipient"]; + $recipientid = $p["recipientid"]; + + $c =& $this->c; + $u =& $this->u; + + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$c->version."');"); + } +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |