Skip to content
Snippets Groups Projects
Commit 6fe9b581 authored by rswindell's avatar rswindell
Browse files

Added support for excluding certain lines of text from IRC messages.

parent d187b17c
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ var port=6667;
var nick="nick";
var msg;
var join=false;
var exclude=new Array();
for(i=0;i<argc;i++) {
switch(argv[i]) {
......@@ -39,6 +40,9 @@ for(i=0;i<argc;i++) {
exit();
}
break;
case "-x":
exclude.push(RegExp(argv[++i],"gi"));
break;
}
}
......@@ -96,6 +100,11 @@ function send(msg)
log("Not sending blank message");
return;
}
for(i in exclude)
if(msg.search(exclude[i])>=0) {
log("Excluding: " + msg);
return;
}
log("Sending: " + msg);
if(!my_server.send("PRIVMSG "+channel+" :"+expand_tabs(msg)+"\r\n"))
alert("send failure");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment