Peace and Protection forum
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: active X command
SiD
Junior Member
**




Posts: 4
Registered: 23-7-2012
Member Is Offline


[*] posted on 23-7-2012 at 23:42
active X command


how can i activate X command without having to add autologin to PnP
i have auto login in my bnc (znc) so it always notice me when i connect that im already logged
i would like to always activate the command
View user's profile View All Posts By User
kap
PnP Developer
**




Posts: 31
Registered: 6-8-2015
Member Is Offline


[*] posted on 27-9-2015 at 13:58


Hi SiD!

  • I've registered a nickname on Undernet;
  • I've logged in to X [manually];
  • I've joined channel #Quebecc;
  • I've right-clicked the channel and clicked X > My Access > Access 450 or higher in #Quebec; (this writes access 450 for #Quebecc to pw.ini in CONFIG\<profilename>\pw.ini)
  • Whilst right-clicking on the nicklist, I can view all actions on nicks pertaining to access level 450.

I disconnect from my bouncer and upon reconnecting I can verify I am still registered with X, but the X commands have gone.
So, what happens?

  • PnP uses hash tables. Plenty hash tables, including one for each $cid (network ID). These are cleared on disconnect/quit etc;
  • PnP loads information to hash table pertaining to X access when you LOGIN to X or when the right NOTICE is returned from X (as found in XW.PPA);
  • These hashes determine that you have the X commands in the channel and nicklist for the channel;
  • We need to find out what pai does to load the right hash table information after you login and authenticate with X successfully;
  • pai's magic is found for example at the /XW LOGIN command in L450 XW.PPA:
    Code:
    hadd pnp. $+ $cid -xwacc.username $3 | _loadxwa

  • Note: $3 is your registered nick with X. Using the command: /xw login <registerednick> <password>

So the fix you are looking for involves running these commands manually on Undernet:
Code:
hadd pnp. $+ $cid -xwacc.username <yourregisterednickname> | _loadxwa


However if you do, you'll find that PnP complains:
*** Server does not recognize _LOADXWA command
This is because _LOADXWA is a local alias (L1079 XW.PPA)

My suggestion would be to either accept the current situation or add an alias to XW.PPA that you need to run manually on UnderNet each time you re-connect to your bouncer. For example:
Code:
alias zncxwa1 { if ($network == UnderNet) hadd pnp. $+ $cid -xwacc.username SiD | _loadxwa }


The below image shows you pre-registration (on the left) and post-registration (on the right) that the command in the code adds my registered nick to hash table for $cid (in this case pnp.7576) as well as channel + channel access level.



Hope I've clarified it a bit.

Let us know how you go!
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group