Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Originally found here http://forums.mirc.com/ubbthreads.php?ubb=showflat&Board=5&Number=228222
- ;edited by mruno
- ;----------------------------------------------------------------------------------------------------------------------
- ;Instructions:
- ;1) Copy and paste all of the code here into a new blank file. /write -c freenode.sasl.mrc
- ;2) Load the file you created and reorder it to load as the first remote script. /load -rs1 freenode.sasl.mrc
- ;3) If you haven't already register your nickname on Freenode using /msg Nickserv Register <password> <email>
- ;NOTE: A confirmation email will be sent. Follow the commands in the email to complete your nick registeration
- ;NOTE: if you cannot connect with mirc due to SASL errors, use the webclient at https://webchat.freenode.net/ and follow go back to step 3
- ;4) Change the your_username and your_password aliases to your username and password that were registered with Freenode's Nickserv
- ;5) Connect to irc.freenode.net - /server irc.freenode.net
- ;----------------------------------------------------------------------------------------------------------------------
- alias -l your_username return CHANGE THIS
- alias -l your_password return CHANGE THIS
- on ^*:LOGON:*:{
- if ($network == Freenode) || (!$network) {
- var %user $your_username
- var %password $your_password
- .raw CAP LS
- echo -s Checking capabilities...
- .raw USER %user 0 * : $+ $fullname
- .raw NICK $mnick
- enable #sasl
- halt
- }
- }
- #sasl off
- raw 001:*:disable #sasl
- raw CAP:* LS *:{
- echo -s Capabilities: $3-
- var %tok
- if ($findtok($3-,sasl,32) != $null) set %tok $addtok(%tok,sasl,32)
- if ($findtok($3-,multi-prefix,32) != $null) set %tok $addtok(%tok,multi-prefix,32)
- if ($findtok($3-,packet-size,32) != $null) set %tok %addtok(%tok,packet-size=1024,32)
- if (%tok != $null) {
- echo -s Enabling: %tok
- .raw CAP REQ : $+ %tok
- }
- if ($findtok($3-,sasl,32) == $null) .raw CAP END
- halt
- }
- raw CAP:* ACK sasl*:.raw AUTHENTICATE PLAIN
- raw AUTHENTICATE:+:{
- if ($network == Freenode) || (!$network) {
- var %user $your_username
- var %password $your_password
- sasl-plain %user %password
- halt
- }
- }
- raw 903:*:.raw CAP END
- raw 904:*:.raw CAP END
- raw 905:*:.raw CAP END
- raw 906:*:.raw CAP END
- raw 907:*:.raw CAP END
- #sasl end
- alias sasl-plain {
- bset -t &auth 1 $1
- bset -t &auth $calc( $bvar(&auth,0) + 2 ) $1
- bset -t &auth $calc( $bvar(&auth,0) + 2 ) $2
- var %len = $encode(&auth,mb)
- .raw AUTHENTICATE $bvar(&auth,1,%len).text
- }
Add Comment
Please, Sign In to add comment