Advertisement
spacechase0

IRC Message

Feb 24th, 2012
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1. namespace
  2. {
  3.     const std::string COLOR = "\x03";
  4.     const std::string BOLD  = "\x2";
  5.     const std::string ULINE = "\x1f";
  6.    
  7.     const std::string WHITE = "00";
  8.     const std::string BLACK = "01";
  9.     const std::string DARK_BLUE = "02";
  10.     const std::string GREEN = "03";
  11.     const std::string RED = "04";
  12.     const std::string MAROON = "05";
  13.     const std::string PURPLE = "06";
  14.     const std::string ORANGE = "07";
  15.     const std::string YELLOW = "08";
  16.     const std::string LIME_GREEN = "09";
  17.     const std::string TEAL = "10";
  18.     const std::string CYAN = "11";
  19.     const std::string BLUE = "12";
  20.     const std::string PINK = "13";
  21.     const std::string GREY = "14";
  22.     const std::string LIGHT_GREY = "15";
  23.    
  24.     class Msg
  25.     {
  26.         public:
  27.             std::string buffer;
  28.            
  29.             template< typename T >
  30.             msg& operator << ( const T& t )
  31.             {
  32.                 std::stringstream ss;
  33.                 ss << buffer << t;
  34.                 buffer = ss.str();
  35.                
  36.                 return ( * this );
  37.             }
  38.            
  39.             operator std::string()
  40.             {
  41.                 return buffer;
  42.             }
  43.     };
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement