00001 /* $Id: chat_server.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 00014 class chatserver { 00015 private: 00016 std::map<std::string, member> members; 00017 std::map<std::string, world> worlds; 00018 int c_time; 00019 member *c_member; 00020 world *c_world; 00021 room *c_room; 00022 channel *c_channel; 00023 std::map<std::string, sigc::signal<void, std::string> > commands; 00024 communicate comm; 00025 communicate cent_comm; 00026 channel *cent_ch; 00027 std::string central_server; 00028 std::string session; 00029 public: 00030 chatserver(); 00031 ~chatserver(); 00032 void leadership_check(room *r); 00033 void cleanup(world *w, std::string user); 00034 void change_password(std::string text); 00035 void join_channel(std::string channelname); 00036 void message(std::string text); 00037 void list_channels(std::string dummy); 00038 void channel_info(std::string channel); 00039 void title_channel(std::string title); 00040 void quit(std::string message); 00041 void channel_type(std::string type); 00042 void invite(std::string name); 00043 void whisper(std::string player); 00044 void leave(std::string channel); 00045 void ignore(std::string player); 00046 void unignore(std::string player); 00047 void kick(std::string player); 00048 void mod(std::string player); 00049 void unmod(std::string player); 00050 void mute(std::string player); 00051 void voice(std::string player); 00052 void silence(std::string text); 00053 void unsilence(std::string text); 00054 void whispers(std::string dummy); 00055 void nowhispers(std::string text); 00056 void answer(std::string text); 00057 void crown(std::string player); 00058 void handler(channel *ch); 00059 void client_handler(channel *ch); 00060 void ip_addr(std::string host); 00061 void session_set(std::string session); 00062 void set_name(std::string n); 00063 void log_level(std::string level); 00064 void log_file(std::string logfile); 00065 void do_fork(std::string file); 00066 void main_loop(); 00067 };