comparison mcabber/src/screen.c @ 447:03bb57383cea

Initial Multi-User Chat support This patch adds basic MUC support. We now can: - join an existing room; - create and unlock a room using the /rawxml command; - set our nickname; - send/receive chatgroup messages; - see the members of the room; - leave the room. Chatroom logging is currently disabled, as it could do some unexpected things.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 25 Sep 2005 01:01:44 +0200
parents 7bf6c0c6a714
children 8827bbef84a1
comparison
equal deleted inserted replaced
446:9f4e9e9aaf08 447:03bb57383cea
718 char status = '?'; 718 char status = '?';
719 char pending = ' '; 719 char pending = ' ';
720 enum imstatus budstate; 720 enum imstatus budstate;
721 unsigned short ismsg = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_MSG; 721 unsigned short ismsg = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_MSG;
722 unsigned short isgrp = buddy_gettype(BUDDATA(buddy)) & ROSTER_TYPE_GROUP; 722 unsigned short isgrp = buddy_gettype(BUDDATA(buddy)) & ROSTER_TYPE_GROUP;
723 unsigned short ismuc = buddy_gettype(BUDDATA(buddy)) & ROSTER_TYPE_ROOM;
723 unsigned short ishid = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_HIDE; 724 unsigned short ishid = buddy_getflags(BUDDATA(buddy)) & ROSTER_FLAG_HIDE;
724 725
725 if (rOffset > 0) { 726 if (rOffset > 0) {
726 rOffset--; 727 rOffset--;
727 continue; 728 continue;
746 if (pending == '#') 747 if (pending == '#')
747 wattrset(rosterWnd, COLOR_PAIR(COLOR_NMSG)); 748 wattrset(rosterWnd, COLOR_PAIR(COLOR_NMSG));
748 else 749 else
749 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DES)); 750 wattrset(rosterWnd, COLOR_PAIR(COLOR_BD_DES));
750 } 751 }
752
753 if (ismuc) status = 'C';
751 754
752 strncpy(name, buddy_getname(BUDDATA(buddy)), ROSTER_WIDTH-7); 755 strncpy(name, buddy_getname(BUDDATA(buddy)), ROSTER_WIDTH-7);
753 if (isgrp) { 756 if (isgrp) {
754 char *sep; 757 char *sep;
755 if (ishid) 758 if (ishid)