Skip to content
Snippets Groups Projects
Commit b45c2678 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add '-p' option to over-ride password sent to server via PASS message

If -p (or -P) is the last option given with no argument following, then no
password would be sent to the server (via PASS message).

For Odusseus71
parent 18d4e2f8
Branches
Tags
1 merge request!455Update branch with changes from master
......@@ -89,6 +89,7 @@ var client_cmds = {
/* Command-line options go BEFORE command-line args */
var irc_theme = "irc-default.js";
var user_password = user.security.password;
ARGPARSE: for (cmdarg=0;cmdarg<argc;cmdarg++) {
switch(argv[cmdarg]) {
case "-A":
......@@ -99,6 +100,10 @@ ARGPARSE: for (cmdarg=0;cmdarg<argc;cmdarg++) {
case "-t":
irc_theme=argv[++cmdarg];
break;
case "-P":
case "-p":
user_password = argv[++cmdarg];
break;
default:
break ARGPARSE;
}
......@@ -130,7 +135,8 @@ if(!sock.connect(irc_server,irc_port)) {
clean_exit();
}
send_cmd("PASS", user.security.password); // for use with JS IRC server
if(user_password)
send_cmd("PASS", user_password);
if (nick=="")
nick=user.alias;
nick=nick.replace(/\s+/g,"_");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment