relog after invalid server specified [confirmation]

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Locked
Message
Author
akirac
Noob
Noob
Posts: 19
Joined: 05 Apr 2008, 17:00

relog after invalid server specified [confirmation]

#1 Post by akirac »

in DirectConnection.pm i want to change this block of code to re-login after the 'Invalid server specified, server' error.

i looked at the different parts of the file and made a change to it. I just want to know if it's correct or not. Thanks

Code: Select all

	} else {
			error TF("Invalid server specified, server %s does not exist...\n", $config{server}), "connection";			
					$timeout_ex{'master'}{'time'} = time;
					$timeout_ex{'master'}{'timeout'} = $timeout{'reconnect'}{'timeout'};
					$self->serverDisconnect;
					undef $conState_tries;
			
			return;
		}

sli
Perl Monk
Perl Monk
Posts: 811
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: relog after invalid server specified [confirmation]

#2 Post by sli »

You need to make sure to point out your changes.
cs : ee : realist

akirac
Noob
Noob
Posts: 19
Joined: 05 Apr 2008, 17:00

Re: relog after invalid server specified [confirmation]

#3 Post by akirac »

ok from this:

Code: Select all

		} else {
			error TF("Invalid server specified, server %s does not exist...\n", $config{server}), "connection";

			my @serverList;
			foreach my $server (@servers) {
				push @serverList, $server->{name};
			}
			my $ret = $interface->showMenu(
					T("Please select your login server."),
					\@serverList,
					title => T("Select Login Server"));
			if ($ret == -1) {
				quit();
			} else {
				main::configModify('server', $ret, 1);
				undef $conState_tries;
			}
			return;
		}
i changed it to this :

Code: Select all

	} else {
			error TF("Invalid server specified, server %s does not exist...\n", $config{server}), "connection";
			$timeout_ex{master}{time} = time;
			$timeout_ex{master}{timeout} = $timeout{reconnect}{timeout};
			$self->serverDisconnect;
			$self->setState(Network::NOT_CONNECTED);
			undef $conState_tries;
			return;
		}
is the function in openkore for relog just relog(); ?

Locked