ircproxy  The Ultimate Cyborg

NoticeTarget Class Reference

#include <NoticeTarget.h>

Inheritance diagram for NoticeTarget:

PrivateTarget Target

List of all members.


Detailed Description

A fake channel that is used for communication between user and ircproxy.

This class is used to send notices to the user.

Definition at line 32 of file NoticeTarget.h.


Public Member Functions

 NoticeTarget (ClientSession &client_session, std::string const &target_name, Network &network)
 Construct a NoticeTarget instance for client session client_session with target name target_name on network network.
 ~NoticeTarget ()
 Destructor.
 NoticeTarget (NoticeTarget const &notice_target)
 Copy-constructor.
virtual void new_client_message_received (ClientMessageIn const &msg)
 Called when a new (client) message is received for this target.

Protected Member Functions

virtual char const * channel_modes (void)
 The channel modes for this target, as sent to the client.

Private Attributes

std::string M_notice
 The notice to send.

Constructor & Destructor Documentation

NoticeTarget::NoticeTarget ( ClientSession client_session,
std::string const &  target_name,
Network network 
) [inline]

Construct a NoticeTarget instance for client session client_session with target name target_name on network network.

Definition at line 38 of file NoticeTarget.h.

References debug::channels::dc::objects.

00038                                                                                               :
00039       PrivateTarget(client_session, target_name, network)
00040       { Dout(dc::objects, "Constructing NoticeTarget(" <<
00041           client_session << ", \"" << target_name << "\", " << network << ")"); }
#ifdef CWDEBUG

NoticeTarget::~NoticeTarget (  )  [inline]

Destructor.

Definition at line 44 of file NoticeTarget.h.

00044 { Dout(dc::objects, "Destructing NoticeTarget " << *this); }

NoticeTarget::NoticeTarget ( NoticeTarget const &  notice_target  )  [inline]

Copy-constructor.

Definition at line 46 of file NoticeTarget.h.

References debug::channels::dc::objects.

00046                                                   : PrivateTarget(notice_target)
00047       { Dout(dc::objects, "Copy-constructing NoticeTarget from " << notice_target); }


Member Function Documentation

void NoticeTarget::new_client_message_received ( ClientMessageIn const &  msg  )  [virtual]

Called when a new (client) message is received for this target.

This function handles incoming messages for this target.

Reimplemented from PrivateTarget.

Definition at line 29 of file NoticeTarget.cc.

References ClientMessageIn::client_session(), DoutEntering, MessageIn::key(), and PrivateTarget::new_client_message_received().

00030 {
00031   DoutEntering(dc::debug, "NoticeTarget::new_client_message_received(" << msg << ") for target \"" << in_name(msg.client_session()) << "\".");
00032 
00033   switch(msg.key())
00034   {
00035     using namespace keys;
00036 #ifdef CWDEBUG
00037     case WHO:
00038       DoutFatal(dc::core, "WHO should be handled by calling PrivateTarget::handle_who");
00039       break;
00040 #endif
00041     default:
00042       PrivateTarget::new_client_message_received(msg);
00043       break;
00044   }
00045 }

virtual char const* NoticeTarget::channel_modes ( void   )  [inline, protected, virtual]

The channel modes for this target, as sent to the client.

Reimplemented from PrivateTarget.

Definition at line 55 of file NoticeTarget.h.

00055 { return "mnt"; }


Member Data Documentation

std::string NoticeTarget::M_notice [private]

The notice to send.

Definition at line 34 of file NoticeTarget.h.


The documentation for this class was generated from the following files:

Copyright © 2005-2007 Carlo Wood.  All rights reserved.