Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:logon:*:{
- if ($wd($readini($_sdir(identify.ini), $network, $me),1,44) == 1) { xidentify }
- }
- on *:notice:*:*:{
- if ($nick == NickServ) {
- if (This nick is owned by someone else. Please choose another. iswm $1-) || (This nickname is registered and protected* iswm $1-) { .autojoin -s | xidentify }
- elseif (Password incorrect* iswm $1-) || (Invalid password* iswm $1-) { identset identify }
- elseif (Ghost with your nick has been killed. iswm $1-) { unset $+(%,recover.,$cid) }
- }
- }
- on ^*:usermode:{
- if ($($+(%,saslstate.,$cid),2)) { unset $+(%,saslstate.,$cid) }
- }
- alias identset { nickserv $1- $$input(Enter the password:,vp,NickServ) }
- alias xghost {
- if ($readini($_sdir(identify.ini), $network, $1)) {
- var %password = $wd($readini($_sdir(identify.ini), $network, $1),2,44)
- nickserv recover $1 $decode(%password,m)
- }
- else { identset recover $1 }
- }
- alias pcb { echo $1 $+ $msgstamp $2- }
- alias wd { return $gettok($1,$2,$3) }
- alias _sdir { return $+($scriptdir,system\,$1) }
- alias xidentify {
- if ($readini($_sdir(identify.ini), $network, $me)) {
- var %password = $wd($readini($_sdir(identify.ini), $network, $me),2,44)
- if ($wd($readini($_sdir(identify.ini), $network, $me),1,44) == 1) { .raw CAP REQ :sasl | set $($+(%,saslstate.,$cid)) 1 $me %password }
- elseif ($wd($readini($_sdir(identify.ini), $network, $me),1,44) == 2) { msg nickserv identify $decode(%password,m) }
- elseif ($wd($readini($_sdir(identify.ini), $network, $me),1,44) == 3) { nickserv identify $decode(%password,m) }
- }
- else { identset identify }
- }
- raw cap:*:{
- if ($1- == $me ACK sasl) && ($wd($($+(%,saslstate.,$cid),2),1,32) == 1) { set $+(%,saslstate.,$cid) $puttok($($+(%,saslstate.,$cid),2),2,1,32) | .raw AUTHENTICATE PLAIN }
- }
- raw AUTHENTICATE:+:{
- var %nick = $wd($($+(%,saslstate.,$cid),2),2,32), %pass = $decode($wd($($+(%,saslstate.,$cid),2),3,32),m)
- if ($wd($($+(%,saslstate.,$cid),2),1,32) == 2) {
- bset -tc &auth 1 %nick $+ $lf $+ %nick $+ $lf $+ %pass
- breplace &auth 10 0
- noop $encode(&auth,mb)
- .raw AUTHENTICATE $bvar(&auth,1-).text
- }
- }
- on *:parseline:out:*CAP END*:{ if ($wd($($+(%,saslstate.,$cid),2),1,32) == 2) .parseline -ot }
- raw *:*:{
- var %raw = $right(00 $+ $numeric,3), %query = $iif($query($2),$2,-s)
- if (%raw == 251) && ($($+(%,recover.,$cid),2)) { xghost $($+(%,recover.,$cid),2) }
- elseif (%raw == 433) {
- set -u20 $($+(%,recover.,$cid)) $2
- if ($anick == $null) { .nick $2 $+ $cid }
- }
- elseif (%raw isnum 900-910) {
- if ($($+(%,saslstate.,$cid),2)) {
- unset $+(%,saslstate.,$cid)
- if ($numeric == 900) || ($numeric == 904) { .raw CAP END }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement