Changeset 58b63de6 for root_commands.c


Ignore:
Timestamp:
2015-10-08T08:34:18Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
c788e15
Parents:
2f73692
git-author:
dequis <dx@…> (11-09-15 22:07:10)
git-committer:
dequis <dx@…> (08-10-15 08:34:18)
Message:

IRCv3 SASL capability + PLAIN method

Only plain, no other methods. We don't have built-in SSL to implement
EXTERNAL (certfp) and nothing else is worth implementing.

The actual authentication is pretty much like sending a server password
(when the server's authmode isn't closed), which means it happens in
cmd_identify, but this code also calls storage_check_pass() to send the
required success/failure replies.

SASL doesn't give us much benefit other than standards compliance, but
some clients might appreciate it.

And having a fifth way to do the same thing doesn't hurt! Now we have:

  • identify in &bitlbee
  • identify to nickserv (alias for root)
  • 'nickserv' and 'ns' irc commands
  • server password
  • sasl plain
File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r2f73692 r58b63de6  
    163163                irc_umode_set(irc, "+R", 1);
    164164
     165                if (irc->caps & CAP_SASL) {
     166                        irc_user_t *iu = irc->user;
     167                        irc_send_num(irc, 900, "%s!%s@%s %s :You are now logged in as %s",
     168                                iu->nick, iu->user, iu->host, iu->nick, iu->nick);
     169                }
     170
    165171                bitlbee_whatsnew(irc);
    166172
     
    238244                irc->status |= USTATUS_IDENTIFIED;
    239245                irc_umode_set(irc, "+R", 1);
     246
     247                if (irc->caps & CAP_SASL) {
     248                        irc_user_t *iu = irc->user;
     249                        irc_send_num(irc, 900, "%s!%s@%s %s :You are now logged in as %s",
     250                                iu->nick, iu->user, iu->host, iu->nick, iu->nick);
     251                }
    240252
    241253                /* Set this var now, or anyone who logs in to his/her
Note: See TracChangeset for help on using the changeset viewer.