User List

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
baba^^
Posts: 3
Joined: 2003-06-25 09:33

User List

Post by baba^^ » 2003-06-25 09:44

hi,
i am quite new to C++ and did only java before,so i dont get all of the source code.
my question is:
how do i do it,that dc++ users dont appear as "blue" in my userlist.i tried to figure it out myself,but only ended up confused.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-06-25 10:09

I know nothing about the code and am in a similar place to you, but I think the following code from HubFrame.h might be useful.

Code: Select all

int getImage(const User::Ptr& u) {
    int image = u->isSet(User::OP) ? IMAGE_OP : IMAGE_USER;

    if(u->isSet(User::DCPLUSPLUS))
        image+=2;
    if(u->isSet(User::PASSIVE)) {
        image+=4;
    }
    return image;
}
I'm sure somone familiar with the code is going to come along and completely laugh at me. :)
The world is coming to an end. Please log off.

DC++ Guide | Words

baba^^
Posts: 3
Joined: 2003-06-25 09:33

Post by baba^^ » 2003-06-25 12:55

thx,that helped a lot.now i am compilling,and waiting to see if it works.

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-06-25 12:59

Out if curiosity, what did you change (in terms of code)?
The world is coming to an end. Please log off.

DC++ Guide | Words

baba^^
Posts: 3
Joined: 2003-06-25 09:33

Post by baba^^ » 2003-06-25 15:52

Code: Select all

int getImage(const User::Ptr& u) {
    int image = u->isSet(User::OP) ? IMAGE_OP : IMAGE_USER;

    //if(u->isSet(User::DCPLUSPLUS))
        //image+=2;
    if(u->isSet(User::PASSIVE)) {
        image+=4;
    }
    return image;
}

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2003-06-25 16:12

A simple enough change then. Just to be even more curious and off on a tangent, why would you want it to not do that?
The world is coming to an end. Please log off.

DC++ Guide | Words

Locked