TIP: Click on subject to list as thread! ANSI
echo: binkd
to: Oli
from: Michael Dukelsky
date: 2021-09-09 11:54:00
subject: Perl on_handshake(): @me

Hello Oli,

Thursday September 09 2021, Oli wrote to Michael Dukelsky:

 Ol>>> HELP! ;)
 Ol>>> I'm trying to use the @me array in on_handshake(), but no matter
 Ol>>> what I do I always get the error:

 Ol>>> "Perl on_handshake(): @me contains no valid addresses"

 Ol>>> even with this simple sub:

 Ol>>> sub on_handshake
 Ol>>> {
 Ol>>>   @me;
 Ol>>> }

 MD>> I've never used this hook but as far as I understand you have to
 MD>> put the AKAs you want to present to the @me array. The array in
 MD>> your sub contains no addresses, so you receive the error message.

 Ol> The side effects are a bit confusing:

 Ol> sub on_handshake
 Ol> {
 Ol>      Log(3, ">>");
 Ol> }

 Ol> sub after_handshake
 Ol> {
 Ol>      Log(3, ">> @me");
 Ol> }


 Ol> + 08:43 [1459] outgoing session with 127.0.0.1:24554
 Ol> - 08:43 [1459] >>
 Ol> + 08:43 [1459] Perl on_handshake(): @me contains no valid addresses
 Ol> - 08:43 [1459] OPT CRAM-MD5-fffdf8c077e8c9b94ce2e83d8da0a8ee
 Ol> [...]
 Ol> - 08:43 [1459] session in CRYPT mode
 Ol> - 08:43 [1459] >> 2000:1/2@fakenet
 Ol> 4000:1/1@testnet


 Ol> I'm not sure if this is considered to be expected behavior or a bug?

Well, from my POV the binkd behavior looks logical here. If you specified the values of the @me array, then only the AKA specified in that array would be presented. Since you did not specify any values in @me, binkd presented all of your AKAs during the handshake. In after_handshake() hook, you see the AKAs that were presented during the handshake.

"Perl on_handshake(): @me contains no valid addresses" is here rather not an error message but a warning.

Michael

... node (at) f1042 (dot) ru
--- GoldED+/LNX 1.1.5-b20180707
                                                                                                            
* Origin: Moscow, Russia (2:5020/1042)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.