ircproxy The Ultimate Cyborg |
Definition in file is_channel.h.
#include <string>
#include <cstring>
#include "debug.h"
Go to the source code of this file.
Functions | |
bool | is_channel (char const *name) |
Returns true if name is a channel name. | |
bool | is_channel (std::string const &name) |
Returns true if name is a channel name. | |
bool | is_server (char const *name) |
Returns true if name is a server name. | |
bool | is_server (std::string const &name) |
Returns true if name is a server name. | |
bool | is_nick (char const *name) |
Returns true if name is a nick name. | |
bool | is_nick (std::string const &name) |
Returns true if name is a nick name. |
bool is_channel | ( | char const * | name | ) | [inline] |
Returns true if name is a channel name.
Definition at line 27 of file is_channel.h.
References ASSERT.
Referenced by Target::add_channel(), Target::clientside_get_channel(), ClientSession::create_private_target(), PrivateTarget::handle_command(), is_nick(), Matcher_noarg::match_impl(), QuestionTarget::new_client_message_received(), PrivateTarget::new_client_message_received(), Identity::new_client_message_received(), Identity::notice_target(), Target::serverside_add_channel(), Target::serverside_get_channel(), and Target::sub_channel().
00028 { 00029 ASSERT(*name != 0); 00030 return *name == '#' || *name == '&' || (*name == '@' && name[1] == '#'); 00031 }
bool is_channel | ( | std::string const & | name | ) | [inline] |
Returns true if name is a channel name.
Definition at line 34 of file is_channel.h.
References ASSERT.
00035 { 00036 ASSERT(!name.empty()); 00037 char c = name[0]; 00038 return c == '#' || c == '&' || (c == '@' && name[1] == '#'); 00039 }
bool is_server | ( | char const * | name | ) | [inline] |
Returns true if name is a server name.
Definition at line 42 of file is_channel.h.
Referenced by is_nick().
bool is_server | ( | std::string const & | name | ) | [inline] |
bool is_nick | ( | char const * | name | ) | [inline] |
Returns true if name is a nick name.
Definition at line 54 of file is_channel.h.
References is_channel(), and is_server().
Referenced by Target::add_joined_nick(), ClientSession::create_private_target(), Target::get_joined_nick(), ServerSession::get_nick(), and ClientSession::get_nick().
00055 { 00056 return !is_channel(name) && !is_server(name); 00057 }
bool is_nick | ( | std::string const & | name | ) | [inline] |
Returns true if name is a nick name.
Definition at line 60 of file is_channel.h.
References is_channel(), and is_server().
00061 { 00062 return !is_channel(name) && !is_server(name); 00063 }
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|