ircproxy The Ultimate Cyborg |
#include <UserMode.h>
Definition at line 143 of file UserMode.h.
Public Member Functions | |
UserMode (void) | |
Default constructor. | |
WatchedExpression< UserModeMask > | operator* (void) |
Dereference operator. Returns the underlying UserModeMask as WatchedExpression. | |
void | new_server_message_received (ServerMessageIn const &msg) |
Decode the MODE message msg and store the user mode. | |
Private Attributes | |
Watched< UserModeMask > | M_mask |
Watchable UserModeMask. |
UserMode::UserMode | ( | void | ) | [inline] |
Default constructor.
Definition at line 149 of file UserMode.h.
00149 : M_mask("UserMode::M_mask") { }
WatchedExpression<UserModeMask> UserMode::operator* | ( | void | ) | [inline] |
Dereference operator. Returns the underlying UserModeMask as WatchedExpression.
Definition at line 153 of file UserMode.h.
References M_mask.
00153 { return *M_mask; }
void UserMode::new_server_message_received | ( | ServerMessageIn const & | msg | ) |
Decode the MODE message msg and store the user mode.
Definition at line 25 of file UserMode.cc.
References DoutEntering, M_mask, and MessageIn::param().
Referenced by ServerSession::new_message_received().
00026 { 00027 DoutEntering(dc::notice, "UserMode::new_server_message_received(" << msg << ")"); 00028 std::string mode_string = msg.param(1); 00029 bool add = true; 00030 for (std::string::iterator iter = mode_string.begin(); iter != mode_string.end(); ++iter) 00031 { 00032 if (*iter == '+') 00033 add = true; 00034 else if (*iter == '-') 00035 add = false; 00036 else if (add) 00037 M_mask |= *iter; 00038 else 00039 M_mask &= ~*iter; 00040 } 00041 Dout(dc::notice, "M_mask is now " << M_mask); 00042 }
Watched<UserModeMask> UserMode::M_mask [private] |
Watchable UserModeMask.
Definition at line 145 of file UserMode.h.
Referenced by new_server_message_received(), and operator*().
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|