r8332 bRO loginPinCode

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

r8332 bRO loginPinCode

#1 Post by EternalHarvest »

http://openkore.svn.sourceforge.net/vie ... threv=8332

"loginPinCode" config option already existed, so I guess that change would break all setups where it was already being used for its other purpose. Not to mention that these is already hook provided for server-specific complications.
ever_boy_
Developers
Developers
Posts: 308
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: r8332 bRO loginPinCode

#2 Post by ever_boy_ »

EternalHarvest wrote:"loginPinCode" config option already existed, so I guess that change would break all setups where it was already being used for its other purpose.
Actually, I don't think it will, since it relies on {broPin}, aside from {loginPinConfig}.
But since you advised me not to mess with directconnection.pm, I think this is pretty much the same case...
EternalHarvest wrote: Not to mention that these is already hook provided for server-specific complications.
this one, right?

Code: Select all

$self->{charSelectScreenHook} = Plugins::addHook(charSelectScreen => sub {
   $Globals::timeout{charlogin}{time} = time;
   $_[1]{return} = 2;
});
Just out of curiosity, how can I give this hook a slightly bigger timeout, without setting it in timeout.txt?
EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: r8332 bRO loginPinCode

#3 Post by EternalHarvest »

ever_boy_ wrote: Actually, I don't think it will, since it relies on {broPin}, aside from {loginPinConfig}.
Read the code again and imagine what will happen if any of these options aren't empty.
Just out of curiosity, how can I give this hook a slightly bigger timeout, without setting it in timeout.txt?
Timeout objects, where used as the only argument to timeOut(), are hashes with "time" and "timeout" keys.
Fr3DBr
Developers
Developers
Posts: 60
Joined: 05 Oct 2011, 09:21
Noob?: No
Location: Brazil

Re: r8332 bRO loginPinCode

#4 Post by Fr3DBr »

I've modified the wanted behavior in misc.pm, avoiding a possible race condition unexpected by it for people not playing in bRO.