chatserver/member.h

Go to the documentation of this file.
00001 /* $Id: member.h jjs $ */
00002 /*
00003    Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
00004    Part of the Moros Project http://moros.sourceforge.net/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License.
00008    This program is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY.
00010 
00011    See the COPYING file for more details.
00012 */
00013 #ifndef __MEMBER_H
00014 #define __MEMBER_H
00015 
00016 #include <map>
00017 
00019 
00020 class member {
00021     public:
00023     bool connected;
00025     std::string name;
00027     std::string password;
00029     bool whispers;
00031     std::string autoanswer;
00033     class world *world;
00037     int last;
00039     class room* current;
00041     std::map<std::string,bool> ignore;
00043     class channel *ch;
00044 
00045     member(std::string membername="") {
00046         connected=false;
00047         password="";
00048         whispers=true;
00049         autoanswer="";
00050     };
00051     std::string status(class room *r) {
00052         std::string res="";
00053         room_member m=r->members[name];
00054         switch(m.status) {
00055             case Status_muted:
00056                 return "muted";
00057             case Status_member:
00058                 if (r->silenced) return "silenced";
00059                 return "member";
00060             case Status_moderator:
00061                 return "moderator";
00062             case Status_leader:
00063                 return "leader";
00064         }
00065         return "";
00066     }
00067 };
00068 
00069 #endif // __MEMBER_H


Generated on Tue Jan 1 17:30:00 2008 for chatserver/member.h Source File by  doxygen   Visit the project page on SourceForge.net Logo