Page MenuHomeDevCentral

Improve login
ClosedPublic

Authored by dereckson on Jan 29 2017, 22:04.
Tags
None
Referenced Files
F54489759: D883.id2243.diff
Mon, Oct 19, 20:03
F54482596: D883.id2244.diff
Mon, Oct 19, 17:19
F54475811: D883.id2244.diff
Mon, Oct 19, 14:39
F54441667: D883.id.diff
Mon, Oct 19, 04:03
Unknown Object (File)
Sun, Oct 18, 13:16
Unknown Object (File)
Tue, Oct 13, 13:06
Unknown Object (File)
Sun, Oct 11, 12:46
Unknown Object (File)
Sun, Oct 11, 05:26
Subscribers
None

Details

Summary

Improve login code

Notify when the pass has been recognized, but not for a channel
the user is.

Improve verify_pass code style:

  • avoid useless explicit cast, as variable is already this type
  • avoid assignation in if clause
  • extract complex condition in has_access_for_this_channel()
Test Plan

Create an access #anotherchan in userlist.db

Then try to login:

18:25:09 <Dereckson> login ...
18:25:09 -Ephemereal- Pass verified but access is only for #anotherchan.

Diff Detail

Repository
rDARKBOT Darkbot
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson added inline comments.
source/helpers.c
268

This violates single responsibility, it verifies, and it notifies.

This revision is now accepted and ready to land.Jan 29 2017, 22:06
This revision was automatically updated to reflect the committed changes.