Advertisement
Adiemus

Untitled

Oct 7th, 2015
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. <?php
  2. require_once('../SSI.php');
  3. global $context;
  4.  
  5. /*if ($context['user']['is_guest']) {*/
  6. if ($context["user"]["id"]<1) {
  7. $userchatname = 'chatz-Guest_' . rand(1,10000);
  8. } else {
  9. $userchatname = $context['user']['name'];
  10. }
  11. $userchatname = str_replace(" ","_",$userchatname);
  12. $userchatname = str_replace(".","_",$userchatname);
  13.  
  14. ?>
  15.  
  16. var params = {};
  17.  
  18. /* Change these parameters */
  19. params.host = "irc.trifecta-chat.net";
  20. params.port = 6667;
  21. params.policyPort = 3843;
  22. params.host = "irc.trifecta-chat.net";
  23. params.accessKey = "KBA8D-3D0CR-XYXNW-T3411-01A19";
  24. params.rtmfp = "rtmfp://p2p.rtmfp.net/5aca807e96d887f8316d8eae-82c441b30f7b";
  25. params.webcam = true;
  26.  
  27. /* Language for the user interface. Currently available translations: ar, bd, bg, br, cz, da, de, el, en, es, et, fi, fr, hu, hr, id, it, ja, nl, pl, pt, ro, ru, sl, sq, sr_cyr, sr_lat, sv, th, tr, uk */
  28. params.language = "en";
  29.  
  30. /* Relative or absolute URL to a lightIRC CSS file.
  31. * The use of styles only works when you upload lightIRC to your webspace.
  32. * Example: css/lightblue.css
  33. */
  34. params.styleURL = "css/";
  35.  
  36. /* Nick to be used. A % character will be replaced by a random number */
  37. params.nick = "<?php echo $userchatname; ?>";
  38. /* Channel to be joined after connecting. Multiple channels can be added like this: #lightIRC,#test,#help */
  39. params.autojoin = "#sdm";
  40. /* Commands to be executed after connecting. E.g.: /mode %nick% +x */
  41. params.perform = "/mode ";
  42.  
  43. /* Whether the server window (and button) should be shown */
  44. params.showServerWindow = true;
  45.  
  46. /* Show a popup to enter a nickname */
  47. params.showNickSelection = true;
  48. /* Adds a password field to the nick selection box */
  49. params.showIdentifySelection = true;
  50.  
  51. /* Show button to register a nickname */
  52. params.showRegisterNicknameButton = true;
  53.  
  54. /* Show button to register a channel */
  55. params.showRegisterChannelButton = true;
  56.  
  57. /* Opens new queries in background when set to true */
  58. params.showNewQueriesInBackground = false;
  59.  
  60.  
  61. /* Position of the navigation container (where channel and query buttons appear). Valid values: left, right, top, bottom */
  62. params.navigationPosition = "bottom";
  63.  
  64.  
  65. /* See more parameters at http://redmine.lightirc.com/projects/lightirc/wiki/Customization_parameters */
  66.  
  67.  
  68. /* Use this method to send a command to lightIRC with JavaScript */
  69. function sendCommand(command) {
  70. swfobject.getObjectById('lightIRC').sendCommand(command);
  71. }
  72.  
  73. /* This method gets called if you click on a nick in the chat area */
  74. function onChatAreaClick(nick) {
  75. //alert("onChatAreaClick: "+nick);
  76. }
  77.  
  78. /* This method gets called if you use the parameter contextMenuExternalEvent */
  79. function onContextMenuSelect(type, nick) {
  80. alert("onContextMenuSelect: "+nick+" for type "+type);
  81. }
  82.  
  83. /* This method gets called if you use the parameter loopServerCommands */
  84. function onServerCommand(command) {
  85. return command;
  86. }
  87.  
  88. /* This loop escapes % signs in parameters. You should not change it */
  89. for(var key in params) {
  90. params[key] = params[key].toString().replace(/%/g, "%25");
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement