summaryrefslogtreecommitdiff
path: root/vchat-client.c
diff options
context:
space:
mode:
authorerdgeist <>2012-02-27 00:06:17 +0000
committererdgeist <>2012-02-27 00:06:17 +0000
commit7dbafe3f0fa465949ef66d800a8cbd0b191c9519 (patch)
tree45ad89dfee0154b76d2473a3d71ffbb0222bf7b4 /vchat-client.c
parentf434f9cd4eabfcad3a90711494febbfd89e4ed5f (diff)
Complete rewrite of user handling. HEADS UP\!
Diffstat (limited to 'vchat-client.c')
-rwxr-xr-xvchat-client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vchat-client.c b/vchat-client.c
index 7324cda..d5960a5 100755
--- a/vchat-client.c
+++ b/vchat-client.c
@@ -27,7 +27,9 @@
27#include <signal.h> 27#include <signal.h>
28#include <readline/readline.h> 28#include <readline/readline.h>
29#include <locale.h> 29#include <locale.h>
30
30#include "vchat.h" 31#include "vchat.h"
32#include "vchat-user.h"
31 33
32/* version of this module */ 34/* version of this module */
33char *vchat_cl_version = "$Id$"; 35char *vchat_cl_version = "$Id$";
@@ -432,8 +434,8 @@ void usage( char *name) {
432 printf (" -s set server (default \"%s\")\n",getstroption(CF_SERVERHOST)); 434 printf (" -s set server (default \"%s\")\n",getstroption(CF_SERVERHOST));
433 printf (" -p set port (default %s)\n",getstroption(CF_SERVERPORT)); 435 printf (" -p set port (default %s)\n",getstroption(CF_SERVERPORT));
434 printf (" -c set channel (default %d)\n",getintoption(CF_CHANNEL)); 436 printf (" -c set channel (default %d)\n",getintoption(CF_CHANNEL));
435 if (nick) 437 if (own_nick_get())
436 printf(" -n set nickname (default \"%s\")\n",nick); 438 printf(" -n set nickname (default \"%s\")\n",own_nick_get());
437 else 439 else
438 puts (" -n set nickname"); 440 puts (" -n set nickname");
439 printf (" -f set from (default \"%s\")\n",getstroption(CF_FROM)); 441 printf (" -f set from (default \"%s\")\n",getstroption(CF_FROM));
@@ -468,7 +470,7 @@ main (int argc, char **argv)
468 case 's': setstroption(CF_SERVERHOST,optarg); break; 470 case 's': setstroption(CF_SERVERHOST,optarg); break;
469 case 'p': setstroption(CF_SERVERPORT,optarg); break; 471 case 'p': setstroption(CF_SERVERPORT,optarg); break;
470 case 'c': setintoption(CF_CHANNEL,strtol(optarg,NULL,10)); break; 472 case 'c': setintoption(CF_CHANNEL,strtol(optarg,NULL,10)); break;
471 case 'n': setstroption(CF_NICK,optarg); break; 473 case 'n': own_nick_set(optarg); break;
472 case 'f': setstroption(CF_FROM,optarg); break; 474 case 'f': setstroption(CF_FROM,optarg); break;
473 case 'h': usage(argv[0]); exit(0); break; 475 case 'h': usage(argv[0]); exit(0); break;
474 default : usage(argv[0]); exit(1); 476 default : usage(argv[0]); exit(1);