[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing to xchat variables





On Thu, 2 Mar 2000, Leo Cacciari wrote:

> Leo Cacciari scripsit:
> >Hi,
> >  is it possible to access xchat variables, such as nickname1, in a
> >perl script? I tried $nickname1 but it does not work...
> 
> Well.... I locked trough the source code and it seems to me that it is 
> impossible to do what I would like.... The informations I want are
> kept by xchat in struct xchatpref prefs variabel (xchat.c line 68),
> which is not accessible in perl.c. It follows that perl has no way to
> access it... 
> 
> Should I try to modify perl.c adding a new perl-function
> such as IRC::get_prefs like IRC::get_info but giving access to field
> in prefs variable? Or are the people in the developpement team already 
> doing this?

Sounds pretty good, and no, I don't think anyone is doing it.


> If I'm going to do this I need answers to the following questions:
> 
>   1. which fields of prefs are people interested in? I only feel the
>      need for preferred nickname(s), but other people may need
>      something like realname, username and so on...

If you traverse the big struct in cfgfiles.c, you can provide access to
any variable without much code. Just look at the cmd_set() function.


>   2. Once this is done, what do I do? Do I send the diff file to
>      someone?

You can send the diff to me: zed@linuxpower.org


-
XChat-discuss: mailing list for XChat users
Archive:       http://mail.nl.linux.org/lists/
Posted By:     Peter Zelezny <zed@linux.com>