diff options
author | erdgeist <> | 2007-07-01 13:38:52 +0000 |
---|---|---|
committer | erdgeist <> | 2007-07-01 13:38:52 +0000 |
commit | d7dbef2fae8eeb3c077faca6eb59e86f636191b8 (patch) | |
tree | a3b322be322c59fd7500a836dc149870a17bc3d6 /vchat-client.c | |
parent | 115003bd86a50e6d84fca063ab72451e317e787a (diff) |
Introducing /reconnect command
Diffstat (limited to 'vchat-client.c')
-rwxr-xr-x | vchat-client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vchat-client.c b/vchat-client.c index dc06015..f521432 100755 --- a/vchat-client.c +++ b/vchat-client.c | |||
@@ -40,6 +40,8 @@ unsigned int loggedin = 0; | |||
40 | int status = 1; | 40 | int status = 1; |
41 | /* we set this, we WANT to quit */ | 41 | /* we set this, we WANT to quit */ |
42 | int ownquit = 0; | 42 | int ownquit = 0; |
43 | /* we set this, we DONT want to quit */ | ||
44 | int wantreconnect = 0; | ||
43 | 45 | ||
44 | /* error string to show after exit */ | 46 | /* error string to show after exit */ |
45 | char errstr[ERRSTRSIZE] = "\0"; | 47 | char errstr[ERRSTRSIZE] = "\0"; |
@@ -549,8 +551,10 @@ main (int argc, char **argv) | |||
549 | /* sanely close connection to server */ | 551 | /* sanely close connection to server */ |
550 | vcdisconnect (); | 552 | vcdisconnect (); |
551 | 553 | ||
552 | if( !ownquit && getintoption( CF_AUTORECONN ) ) | 554 | if( !ownquit && ( getintoption( CF_AUTORECONN ) || wantreconnect ) ) |
553 | status = 1; | 555 | status = 1; |
556 | |||
557 | wantreconnect = 0; | ||
554 | } | 558 | } |
555 | 559 | ||
556 | /* call cleanup-hook without signal */ | 560 | /* call cleanup-hook without signal */ |