Mercurial > hg
comparison mcabber/src/roster.c @ 863:4f1a93faffea
Add roster_getnickname()
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 23 May 2006 21:38:27 +0200 |
parents | a8fadbd97858 |
children | afdd81c2c44d |
comparison
equal
deleted
inserted
replaced
862:5ed97fc7afa0 | 863:4f1a93faffea |
---|---|
598 | 598 |
599 roster_usr = (roster*)sl_user->data; | 599 roster_usr = (roster*)sl_user->data; |
600 return roster_usr->name; | 600 return roster_usr->name; |
601 } | 601 } |
602 | 602 |
603 const char *roster_getnickname(const char *jid) | |
604 { | |
605 GSList *sl_user; | |
606 roster *roster_usr; | |
607 | |
608 sl_user = roster_find(jid, jidsearch, | |
609 ROSTER_TYPE_USER|ROSTER_TYPE_ROOM|ROSTER_TYPE_AGENT); | |
610 if (sl_user == NULL) | |
611 return NULL; // Not in the roster... | |
612 | |
613 roster_usr = (roster*)sl_user->data; | |
614 return roster_usr->nickname; | |
615 } | |
616 | |
603 void roster_settype(const char *jid, guint type) | 617 void roster_settype(const char *jid, guint type) |
604 { | 618 { |
605 GSList *sl_user; | 619 GSList *sl_user; |
606 roster *roster_usr; | 620 roster *roster_usr; |
607 | 621 |