/* * lightIRC configuration * www.lightIRC.com * * You can add or change these parameters to customize lightIRC. * Please see the full parameters list at http://redmine.lightirc.com/projects/lightirc/wiki/Customization_parameters * */ var params = {}; /* Change these parameters */ params.host = "irc.librairc.net"; params.port = 6667; params.policyPort = 8002; /* Use this method to send a command to lightIRC with JavaScript */ function sendCommand(command) { swfobject.getObjectById('lightIRC').sendCommand(command); } /* Use this method to send a message to the active chatwindow */ function sendMessageToActiveWindow(message) { swfobject.getObjectById('lightIRC').sendMessageToActiveWindow(message); } /* Use this method to set a random text input content in the active window */ function setTextInputContent(content) { swfobject.getObjectById('lightIRC').setTextInputContent(content); } /* This method gets called if you click on a nick in the chat area */ function onChatAreaClick(nick, ident, realname, channel, host) { //alert("onChatAreaClick: "+nick); sendCommand("/query "+nick); } params.contextMenuExternalEvent = "India Chat,Gio Chat,Slap"; /* This method gets called if you use the parameter contextMenuExternalEvent */ function onContextMenuSelect(type, nick, ident, realname, channel, host) { alert("onContextMenuSelect: "+nick+" for type "+type); } function onContextMenuSelect(type, nick, ident, realname, channel, host) { if(type == "India Chat"){ window.open("http://indiachat.com", "_blank"); } if(type == "Opens #Facebook ChatQNetwork fan page(Like us!)"){ window.open("http://giochat.com", "_blank"); } if (type === "Send a kiss or hug for Blue SUPERMAN!") { sendcommand("/me slaps $nick"); } } /* This event ensures that lightIRC sends the default quit message when the user closes the browser window */ window.onbeforeunload = function() { swfobject.getObjectById('lightIRC').sendQuit(); } /* This loop escapes % signs in parameters. You should not change it */ for(var key in params) { params[key] = params[key].toString().replace(/%/g, "%25"); } /* This method gets called if you use the parameter loopClientCommands */ var nicks; function onClientCommand(command) { if(command == "fullscreen"){ $( ".swf" ).animate({ width: "100%", height: "100%", marginTop: "-180px", }, 1500 ); command = ""; } if(command == "smallscreen"){ $( ".swf" ).animate({ width: "800", height: "400", marginTop: "0px", }, 1500 ); command = ""; } var commandExplode = command.split(" "); if(commandExplode.length < 3){ if(commandExplode[0] == "NICK"){ nicks = commandExplode[1]; nicks = nicks.split(":"); nicks = nicks[1]; return command; } if(commandExplode[0] == "mode"){ if(commandExplode[1] == "#india"){ sendCommand("/msg #india Hello"); return command; } } } if(command == "hello"){ sendCommand("/msg #india hi all :)"); command = ""; } if(command == "web"){ window.open("http://giochat.com", "_blank"); command = ""; } if(command == "info"){ sendCommand("/msg #india -------- Welcome to www.GioChat.com !! --------"); sendCommand("/msg #india ----------------- #India -------------"); sendCommand("/msg #india -----------------------------------------------"); sendCommand("/msg #india ------- Powered by: www.indiachat.com -------"); command = ""; } return command; } function onServerCommand(command) { if(command.indexOf("PRIVMSG") > -1) { var tokens = command.split(" "); if(tokens.length > 2) { var message = tokens.slice(3).join(" "); message = message.replace(/www/g, "http://webirc.org/?filter").replace(/http/g, "http://webirc.org/?filter").replace(/allchatnetwork.net/g, "ICQ").replace(/sexichat.net/g, "ICQ"); command = tokens.slice(0, 3).join(" ")+" "+message; } } return command; } function onClientCommand(command) { if(command == "PART #india") { return null; } return command; }