Support #697

Replace URLS or Text to Custom Message

Added by Suman Armaan over 3 years ago. Updated over 3 years ago.

Status:NewStart date:10/31/2015
Priority:UrgentDue date:
Assignee:Valentin Manthei% Done:


Target version:-


I explored BugTracker of lightIRC and found a code for disabling links in chat. The code is present in config.js as:-

/ This method gets called if you use the parameter loopServerCommands /
function onServerCommand(command) {
if(command.indexOf("PRIVMSG") > -1) {
var tokens = command.split(" ");
if(tokens.length > 2) {
var message = tokens3;
message = message.replace("www", "w*w");
message = message.replace("http", "ht*p");
command = tokens.slice(0, 3).join(" ")+" "+message;
return command;

But, I am confused on how to replace the words like www/http:// or http://www. or .com etc. to custom text by me. I am not sure, how to do this.
The scene: User sends the message like: Hey! Join!!! /!!! etc. but the message changes to "Do not send such text" etc.
I hope you have get me.


#1 Updated by Valentin Manthei over 3 years ago

Is it still up to date?

Also available in: Atom PDF