Project

General

Profile

Actions

Feature #5585

closed

a function that returns the account from a nickname

Added by armin armin 7 months ago. Updated 7 months ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
05/13/2022
Due date:
% Done:

0%

Estimated time:
Operative System:
All

Description

Hi

Is there a function that returns a user's account from the nickname?

Example :

  • The user's nickname is NickA and his account is AccountA
  • The goal is to do something like this: //echo -a $account(NickA) and it returns AccountA

Cordialement

Actions #1

Updated by westor (GR) 7 months ago

use: $ial().account
example: $ial(westor).account

https://dev.adiirc.com/projects/adiirc/wiki/$ial

Actions #2

Updated by Per Amundsen 7 months ago

  • Status changed from New to Duplicate
Actions #3

Updated by armin armin 7 months ago

westor thank you

I made a quick function that might be useful:

; Know if a nick is using an account with $true or $false : //echo -a $isAccount(tapavu)
; Know if nick uses an account, if yes it returns the account :  //echo -a $isAccount(tapavu,1)
; If the account does not exist, then $false : //echo -a $isAccount(FakeUser)
alias isAccount {
  var %account = $ial($1).account
   if ( %account ) {
     if ($2 == 1) {
     return %account
     }
     return $true
   }
   else {
     return $false
   }
 } 
Actions

Also available in: Atom PDF