Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hooks.c @ 489:21ab22a60bcb
Auto-convert a roster item to "room" type when receiving a groupchat message
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 07 Oct 2005 20:12:11 +0200 |
parents | 55aa45eb7ece |
children | 6c3cd3aa4a91 |
comparison
equal
deleted
inserted
replaced
488:9e8519078e00 | 489:21ab22a60bcb |
---|---|
64 if (!roster_usr) { // Shouldn't happen... | 64 if (!roster_usr) { // Shouldn't happen... |
65 scr_LogPrint(LPRINT_LOGNORM, "ERROR: unable to add buddy!"); | 65 scr_LogPrint(LPRINT_LOGNORM, "ERROR: unable to add buddy!"); |
66 if (bmsg) g_free(bmsg); | 66 if (bmsg) g_free(bmsg); |
67 return; | 67 return; |
68 } | 68 } |
69 } else if (is_groupchat) { | |
70 // Make sure the type is ROOM | |
71 buddy_settype(roster_usr->data, ROSTER_TYPE_ROOM); | |
69 } | 72 } |
70 | 73 |
71 is_room = !!(buddy_gettype(roster_usr->data) & ROSTER_TYPE_ROOM); | 74 is_room = !!(buddy_gettype(roster_usr->data) & ROSTER_TYPE_ROOM); |
72 | 75 |
73 if (!is_groupchat && is_room) { | 76 if (!is_groupchat && is_room) { |