Introduction
Introduction Statistics Contact Development Disclaimer Help
reversed the -u switch - sic - simple irc client
git clone git://git.suckless.org/sic
Log
Files
Refs
README
LICENSE
---
commit bade9ccb6cc6e1e4969644ca8d96ad9c32de23f4
parent 2831ca36c3b6f8987e6cd188db44e451b4661862
Author: [email protected] <unknown>
Date: Sun, 5 Feb 2012 16:47:38 +0100
reversed the -u switch
Diffstat:
M LICENSE | 2 +-
M sic.c | 12 ++++--------
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/LICENSE b/LICENSE
@@ -1,6 +1,6 @@
MIT/X Consortium License
-© 2005-2009 Anselm R Garbe <[email protected]>
+© 2005-2012 Anselm R Garbe <[email protected]>
© 2008-2009 Jeroen Schot <[email protected]>
© 2007-2009 Kris Maglione <[email protected]>
© 2005 Nico Golde <nico at ngolde dot de>
diff --git a/sic.c b/sic.c
@@ -138,8 +138,7 @@ main(int argc, char *argv[]) {
const char *user = getenv("USER");
fd_set rd;
- if (!user) user = "unknown";
- strlcpy(nick, user, sizeof nick);
+ strlcpy(nick, user ? user : "unknown", sizeof nick);
for(i = 1; i < argc; i++) {
c = argv[i][1];
if(argv[i][0] != '-' || argv[i][2])
@@ -157,13 +156,10 @@ main(int argc, char *argv[]) {
case 'k':
if(++i < argc) password = argv[i];
break;
- case 'u':
- if (++i < argc) user = argv[i];
- break;
case 'v':
- eprint("sic-"VERSION", © 2005-2009 Kris Maglione, Ans…
+ eprint("sic-"VERSION", © 2005-2012 Kris Maglione, Ans…
default:
- eprint("usage: sic [-h host] [-p port] [-n nick] [-k k…
+ eprint("usage: sic [-h host] [-p port] [-n nick] [-k k…
}
}
/* init */
@@ -173,7 +169,7 @@ main(int argc, char *argv[]) {
if(password)
sout("PASS %s", password);
sout("NICK %s", nick);
- sout("USER %s localhost %s :%s", user, host, nick);
+ sout("USER %s localhost %s :%s", nick, host, nick);
fflush(srv);
setbuf(stdout, NULL);
setbuf(srv, NULL);
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.