Jethro commented on a Page, Auto Join   -  Sep 23, 2011

Here is what I meant by what I said:

menu channel { 
  Auto Join ( $+ $iif(%aj,on,off) $+ ) 
  .on:set %aj on
  .off:unset %aj
  .- 
  .Add { hadd -m aj $network $&
      $addtok($hget(aj,$network),#,44)
  echo -s # added to autojoin } 
  .Del { hadd -m aj $network $&
      $remtok($hget(aj,$network),#,1,44) 
  echo -s # removed from autojoin } 
} 
on *:exit: hsave -o aj aj
on *:connect: if (%aj) && ($hget(aj)) join $hget(aj,$network) 
on *:start: if ($file(aj).shortfn) hmake aj 100 | hload aj $v1
on *:input:#:{ if ($regex($1,/^([+-])ajoin$|ajo(n|ff)$/iS)) {
    if ($regml(1) == ff) { unset %aj | echo -a AutoJoin Off }
    elseif ($regml(1) == n) { set %aj on | echo -a Autojoin On }
    else { var %h = $hget(aj,$network), %a = $addtok(%h,#,44)
      var %r = $remtok(%h,#,1,44) | hadd -m aj $network $&
        $iif($regml(1) == +,%a,%r) | echo -a # $iif($regml(1) != -,$&
    added to,removed from) autojoin for $server } }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.