Page MenuHomeDevCentral

Improve login
ClosedPublic

Authored by dereckson on Jan 29 2017, 22:04.
Tags
None
Referenced Files
F12870826: D883.id.diff
Sat, Nov 15, 15:56
F12867351: D883.id2244.diff
Sat, Nov 15, 15:18
F12867346: D883.id2243.diff
Sat, Nov 15, 15:18
F12855780: D883.diff
Sat, Nov 15, 12:55
F12789215: D883.id2244.diff
Fri, Nov 14, 23:49
F12788817: D883.id.diff
Fri, Nov 14, 23:45
F12788641: D883.diff
Fri, Nov 14, 23:43
Unknown Object (File)
Fri, Nov 14, 03: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
No Lint Coverage
Unit
No Test Coverage
Branch
debug-login (branched from master)
Build Status
Buildable 1362
Build 1610: arc lint + arc unit

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.