@@ -1169,11 +1169,13 @@ def process_handshake(self, peerid: str, message: str,
1169
1169
accepted = handshake_json ["accepted" ]
1170
1170
nick = handshake_json ["nick" ]
1171
1171
net = handshake_json ["network" ]
1172
+ motd = handshake_json ["motd" ]
1172
1173
assert isinstance (proto_max , int )
1173
1174
assert isinstance (proto_min , int )
1174
1175
assert isinstance (features , dict )
1175
1176
assert isinstance (nick , str )
1176
1177
assert isinstance (net , str )
1178
+ assert isinstance (motd , str )
1177
1179
except Exception as e :
1178
1180
log .warn ("Invalid handshake message from: {},"
1179
1181
" exception: {}, message: {},ignoring" .format (
@@ -1200,6 +1202,8 @@ def process_handshake(self, peerid: str, message: str,
1200
1202
return
1201
1203
# We received a valid, accepting dn-handshake. Update the peer.
1202
1204
peer .update_status (PEER_STATUS_HANDSHAKED )
1205
+ # Show the info for the directory to the user, with emphasis:
1206
+ self .info_callback ("\n \n " + motd + "\n \n " )
1203
1207
peer .set_nick (nick )
1204
1208
else :
1205
1209
# it means, we are receiving an initial handshake
0 commit comments